When saving a product in admin, extra images are generated in pub/media/catalog/product/cache.
the sizes are coming from the view.xml file defined in the luma and blank themes in the vendor core folder.
How I can avoid those extra images generated in the cache folder?
Looks like https://github.com/magento/magento2/issues/3650 is related to me. Some workarounds are available in comments there.
This is more a duplicate of https://github.com/magento/magento2/issues/8145, although being able to remove/disable a theme should probably also work around this issue.
There is also a closed PR which you can maybe turn into a module which should solve this problem (haven't tested this for a couple of months, so no idea if this is still relevant for the latest Magento version): https://github.com/magento/magento2/pull/8142
Thanks @orlangur and @hostep,
I have tested the proposed solution from @vrann and works fine!
I have created a temporary module (waiting for the next update of magento 2.x) that implements the fix without changing anything in the vendor core folder:
di.xml:
<preference for="Magento\Catalog\Model\Product\Image\Cache"
type="VENDOR\MagentoFix\Model\Product\Image\Cache"/>
app\code\VENDOR\MagentoFix\Model\Product\Image\Cache.php:
With the contents of: @vrann fix
with the namespace changed to VENDOR.
@miquelcoma, thank you for your report.
We've created internal ticket(s) MAGETWO-80436 to track progress on the issue.
I'm working on it #SQUASHTOBERFEST
@vrann ,
I am using magento 2.1.6 version , in my admin panel having images on each and every products , but frontend image path didn't created a folder '"cache/f073062f50e48eb0f0998593e568d857" ..
Please give a solutions .
Waiting for the official fix, do you have suggestions to identify which are the unused cache folders so I can delete it?
Hi was wondering if is there is an update on this?
Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
[ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop branchDetails
- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 5. Add label Issue: Confirmed once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
:white_check_mark: Confirmed by @engcom-Bravo
Thank you for verifying the issue. Based on the provided information internal tickets MC-30227 were created
Issue Available: @engcom-Bravo, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._
Hi @miquelcoma.
Thank you for your report and collaboration!
The related internal Jira ticket MC-33501 was closed as non-reproducible in 2.3-develop.
It means that Magento team either unable to reproduce this issue using provided _Steps to Reproduce_ from the _Description section_ on clean Magento instance or the issue has been already fixed in the scope of other tasks.
But if you still run into this problem please update or provide additional information/steps/preconditions in the _Description section_ and reopen this issue.
Hi @miquelcoma.
Thank you for your report and collaboration!
The related internal Jira ticket MC-30227 was closed as non-reproducible in 2.4-develop.
It means that Magento team either unable to reproduce this issue using provided _Steps to Reproduce_ from the _Description section_ on clean Magento instance or the issue has been already fixed in the scope of other tasks.
But if you still run into this problem please update or provide additional information/steps/preconditions in the _Description section_ and reopen this issue.
I was not able to reproduce the issue according to provided steps.
_find pub/media/catalog/product/cache -type f -exec sha1sum {} \; | sort_ did not show any duplicate files
Most helpful comment
Hi was wondering if is there is an update on this?