-
Notifications
You must be signed in to change notification settings - Fork 101
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
Modern Image Formats: Sub-sizes image didn't add original image extension #1560
Comments
Seems like WP return additional mime images in meta instead JPEG that's why the image extension is not apply because the addition mime image is already present in meta data. See https://github.com/WordPress/performance/blob/trunk/plugins/webp-uploads/hooks.php#L214-L217 |
Good catch, @mukeshpanchal27. While the lack of @adamsilverstein can you confirm the expected behavior here? When we're replacing sub-sizes with a modern image format, do we expect the sub-sizes to contain the original file's mime in the new filename? |
JFYI In #444 we Add the original image's extension to the WebP file name to ensure it is unique. |
I will review and test. We add the prefix to avoid naming collisions where two uploads foo.jpeg and foo.jpg (both valid) both get transformed into foo-200x200.webp, with the second upload overwriting the first. The actual file names are an implementation detail and are stored in the database, the important functional pieces here are that there are no file overwrites and that all files are deleted when the media is deleted in the media library. |
I think this is related to my issue here: #1499 |
Thanks. Assigning to @adamsilverstein for review. |
Bug Description
While i test something i found that the uploaded image didn't add original image extension(
-jpeg
) in the sub-sizes but it added in full size image.The issue happen for both(WebP/AVIF) mime type.
Steps to reproduce
Modern Image Formats
plugin.Screenshots
The text was updated successfully, but these errors were encountered: