-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Images take too much space #8469
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
Comments
See #8145 for two suggested fixes for this problem (it's not exactly the same like what you are suggesting though). |
This seems to be somewhat duplicate of #8145 although my report suggests reducing actual size combinations of blank/luma themes themselves. Since blank can be used as parent theme for custom themes, it's important that definitions there 1) make somewhat sense, 2) can be overwritten by custom theme. |
Tracking internally as - MAGETWO-60316 @paveq - is it safe to assume the problem is with blank/luma themes? Ie that a 3rd party theme developer wouldn't create more then 5 different image resizes in general? |
@choukalos Yes, problem is with blank/luma and with themes based on them. Even if theme is not based on blank/luma, Magento will still generate images for them. |
linking with existing PR, which doesn't resolve issue, but ignore themes are not assigned to stores - #8142 |
@paveq, thank you for your report. |
@magento-engcom-team How was this fixed? I still see blank theme defining a lot of image sizes that only slightly differ: https://github.com/magento/magento2/blob/2.2.0/app/design/frontend/Magento/blank/etc/view.xml |
Tested on clean 2.2.0 by adding an image from admin. 35 versions were generated from the original.
|
In addition there being too many different sizes being generated, there's still separate issue of exactly same contents being generated multiple times:
|
Uh oh!
There was an error while loading. Please reload this page.
When adding images through Magento API, Magento pregenerates all defined downscaled versions for that image. While pregenerating downscaled versions is a good thing, it looks like Magento's default theme defines a LOT of differing image sizes.
Image sizes are defined here: https://github.com/magento/magento2/blob/develop/app/design/frontend/Magento/blank/etc/view.xml
Example of almost same size definitions:
Surely there is no proper reason to generate almost equal downscaled versions of the same image? I would expect Magento to maintain maximum of 3-5 downscaled versions.
Preconditions
Steps to reproduce
Expected result
Actual result
Which means originals take 13G, and cached versions take 51G of disk space. There appears to be total of 34 generated versions of one image:
Note that eg. 75x75 pixels sized version is generated multiple times, for thumbnail and for small_image. Actual file content is 1:1 identical.
The text was updated successfully, but these errors were encountered: