Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

商品画像アップロード時のリサイズ処理 #4898

Closed
wants to merge 7 commits into from
Closed

商品画像アップロード時のリサイズ処理 #4898

wants to merge 7 commits into from

Conversation

Rights1995
Copy link

概要(Overview・Refs Issue)

#4347

方針(Policy)

2系であった画像アップロード時のリサイズ処理について、
4系ではアップロード画像の幅、高さやサイズの指定が運用レベルで加工が必要なため
アップロード時に、パラメータで指定した画像ファイルに加工する。

実装に関する補足(Appendix)

アップロード後の画像サイズや、jpg、pngファイルの圧縮率の指示がベタ書きなっています。

テスト(Test)

既に実稼働の環境での要望があり、実稼働サイトのプレビューサイトで、各画像ファイルのアップロードテストを行い、実稼働の環境に適用しています。

相談(Discussion)

@Rights1995
Copy link
Author

再度挙げさせていただきます。

#4349で指摘のあった点も踏まえて最新のものになります。

@tao-s
Copy link
Contributor

tao-s commented Feb 4, 2021

サムネイルの生成については、サイト全体、デザインテンプレートごとに設定値を持って、そのサイズにリサイズする感じが望ましいです。
デザインテンプレートでsettings.yamlとか持って、コアの設定を上書きする感じで。

image_size:
   product_list_image: [150,150]
   product_detail_image: [550,550]

な感じで

@chihiro-adachi chihiro-adachi added the enhancement 機能追加 label Feb 9, 2021
@chihiro-adachi chihiro-adachi added this to the 4.0.x milestone Feb 9, 2021
@okazy
Copy link
Contributor

okazy commented Mar 22, 2021

4.0 のシステム要件の PHP ライブラリに GD が入っていません。
https://doc4.ec-cube.net/quickstart_requirement

4.1 で推奨ライブラリとして GD を追加するのはありだと思います。
どちらにせよ、互換性の観点で GD が入っていない場合はリサイズ処理はしないようにするのがいいと思います。

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 機能追加
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants