Skip to content

Magento creates copies of image files in products that share the same images #39696

Open
@cptX

Description

@cptX

Preconditions and environment

  • Magento version 2.4.7-p3

I have several products that share the same images. For example I sell several electric scooters which share the same characteristics except from the power of the motor and the battery capacity (check them here ). This makes me duplicate the product for every scooter and recreate all the configurations (colors) for every product from scratch. In the configurations I reupload the images for every color from scratch and this creates new copies of the images by adding _1 at the end of the files. This results in a huge disk space consumption and most importantly a high page load time because the system needs to upload all the copies of the images instead of only one! I consider this a major flow in the methodology of image handling in magento. Is there any way to solve this?

Note: I have searched and found some other corresponding issues but almost all of them refer to this problem during csv import which is not my case, because I create the products manually. Also, there are some attempts to use hashing to check for duplicates but probably are not impemented...

Steps to reproduce

  1. Create a configurable product with 2 colors
  2. Upload images in the configurations
  3. Duplicate the product
  4. Delete the configurations (because they reference the original configurations and are not copies)
  5. Create new configurations where you should upload the same images
  6. Check the file names of the images of the new configurations. They are not the same! The system created new copies of the files.

Expected result

Images uploaded should be checked some how if they already exist (eg there are some suggestions to do hashing) and if they are the same the reference to the original file (or files regarding thumbnails) should be used. This can also save processing power for recreating new thumbnails...

Actual result

Currently new uploaded images in new products are not checked if they already exist in the system and they are stored as a new copy, leading to more disk space consumption and higher page load times.

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: ContentComponent: ImageIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Reported on 2.4.7-p3Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions