Skip to content

Extra generated cache images when a product is saved in admin #10363

Closed
@miquelcoma

Description

@miquelcoma

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.

Preconditions

  1. A custom theme with a custom image sizes defined in the view.xml file.
  2. Magento 2.1.7 C.E., in development or production mode.
  3. Running in ngingx with php 7.0.

Steps to reproduce

  1. Have a look at pub/media/catalog/product/cache
  2. Go to admin
  3. Go to Product -> Catalog -> select an article.
  4. Save the product (is not necessary any modification)
  5. Have a look again to the cache folder.

Expected result

  1. In the cache image folder, only the image sizes defined in our custom theme view.xml file exists plus the sizes defined in magento backend theme view.xml file.

Actual result

  1. In the images cache folder appears extra images that have no relation with our theme or magento backend theme etc/view.xml file.
  2. Those extra 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CacheIssue: Cannot ReproduceCannot reproduce the issue on the latest `2.4-develop` branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions