-
Notifications
You must be signed in to change notification settings - Fork 1
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
Ensure optimized images have correct metadata #237
Comments
Copying the data server-side works, but there are PHP warnings because width and height are missing initially when populating So providing client-side might be better. Alternatively, on |
Probably also an issue when uploading an image directly as AVIF? in that case this must be done client-side either way. Vips or canvas could be used to get image dimensions. After that, send to server via |
I think 068ad7b resolved the last remaining issues here. Closing for now. |
When optimizing an existing image and converting it to AVIF, some metadata might be missing if the server doesn't natively support the format.
_wp_attachment_metadata
will only have filesize but nothing else.width
,height
,file
should be trivial to add. Either copy from original or generate client-side.This is needed so that the
missing_image_sizes
logic for client-side thumbnail generation works as expected for AVIF. Right nowmissing_image_sizes
returns an empty array.The text was updated successfully, but these errors were encountered: