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

Change in file hash results in duplicated images #519

Open
emteknetnz opened this issue Sep 29, 2022 · 0 comments
Open

Change in file hash results in duplicated images #519

emteknetnz opened this issue Sep 29, 2022 · 0 comments

Comments

@emteknetnz
Copy link
Member

This PR #518 highlighted a change where manipulated image hashes can be different because of silverstripe/silverstripe-framework#10497

This will result in duplicate images with different files names which is a waste of server storage space

This will affect images directly added to template files with image manipulations performed on them. Off the top of my head I'm not sure if this also affects WYSIWYG inserted images, which presumably would be a larger issue (need to confirm when fixing this work)

A couple of options:

  • Create a cleanup task to identify duplicated images
  • When performing an manipulation, look for the presence of a duplicate image (regenerate the hash using swapping width/height int with string) - if duplicate found, delete it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant