Opened 6 months ago
Last modified 2 weeks ago
#61167 assigned defect (bug)
AVIF image thumbnail not created !
Reported by: | joomskys | Owned by: | adamsilverstein |
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | 6.5 |
Component: | Media | Keywords: | avif image thumbnail good-first-bug early |
Focuses: | performance | Cc: |
Description
Thank you all the team for this great feature.
i have issue when i try to use AVIF image, can you help?
the issue is:
i have AVIF image file,
i uploaded it to wordpress via Media Upload -> https://prnt.sc/54s8JQoSWgfl
image upload completed -> https://prnt.sc/QZmqQiCD-R63
BUT the image thumbnail size like : thumbnail, medium, large, … NOT CREATED ! -> https://prnt.sc/A54F2cFUsHBH
can you look and help ?
am using siteground web hosting!
Thanks
Attachments (5)
Change History (21)
This ticket was mentioned in Slack in #core-performance by spacedmonkey. View the logs.
6 months ago
#2
follow-ups:
↓ 8
↓ 9
@
6 months ago
- Owner set to adamsilverstein
- Status changed from new to assigned
#3
@
6 months ago
the bug is likely on the Gutenberg (rather than core) side though - the editor should reject your AVIF file when you try to upload it on a site that lacks AVIF support.
Correction: looks like we bootstrap the available mime types from the WordPress side. We should be able to address this in core.
This ticket was mentioned in PR #6531 on WordPress/wordpress-develop by @adamsilverstein.
6 months ago
#4
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/61167
#5
@
6 months ago
- Keywords has-patch removed
I created this PR which should disable AVIF uploading on sites where AVIF isn't supported by the server.
Testing in Gutenberg, after this patch I get a warning message on my server that does not support AVIF and I cannot upload the test image.
I expanded the check to include WebP since a small percentage of servers still don't support that format. Checking every format seems excessive.
@adamsilverstein commented on PR #6531:
6 months ago
#6
## Testing instructions
- Use the WordPress playground build above
- Try uploading an AVIF image (see the Trac ticket for a sample image)
#7
@
6 months ago
- Component changed from Upload to Media
- Keywords dev-feedback reporter-feedback added
#8
in reply to:
↑ 2
@
6 months ago
Replying to adamsilverstein:
I got an error message "This image cannot be processed by the web server. Convert it to JPEG or PNG before uploading." and the image refuxed to upload.
Yea this is a bug and needs fixing. Most likely it's a "left over" from the initial implementation of error messages about AVIF files few years ago when they weren't supported in the web browsers.
Looking at https://github.com/WordPress/wordpress-develop/pull/6531: thinking it would be better to show a better error message that explains exactly what's wrong (server not able to work with these images) and tell the users to convert the file before uploading it. Perhaps the same text as in the JS error?
Or maybe implement that error in JS in Gutenberg, and keep the change to allowedMimeTypes
in case an unsupported image is uploaded by other means.
#9
in reply to:
↑ 2
@
6 months ago
Replying to adamsilverstein:
Thank for your watching,
i will contact and request support from my hosting provider!
Best Regard
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
4 months ago
#11
@
2 months ago
- Focuses performance added
- Keywords good-first-bug added; dev-feedback reporter-feedback removed
#12
@
7 weeks ago
Looking at https://github.com/WordPress/wordpress-develop/pull/6531: thinking it would be better to show a better error message that explains exactly what's wrong (server not able to work with these images) and tell the users to convert the file before uploading it. Perhaps the same text as in the JS error?
@azaozz in the PR I'm aiming to alter allowedMimeTypes so that it actually reflects the supported types. This means an error will be shown when trying to upload an AVIF image if the server doesn't have AVIF support. Currently, users don't get any error - the image uploads, but no sub-sized images are created (leading to this bug report).
Is your suggestion that we make this change and ALSO update the error message string?
#13
@
7 weeks ago
Note we have this related ticket about updating the error message - https://core.trac.wordpress.org/ticket/61361
@adamsilverstein commented on PR #6531:
2 weeks ago
#14
Closing in favor of https://github.com/WordPress/wordpress-develop/pull/7629
This ticket was mentioned in PR #7629 on WordPress/wordpress-develop by @adamsilverstein.
2 weeks ago
#15
- Keywords has-patch added
#16
@
2 weeks ago
- Keywords early added; has-patch removed
- Milestone changed from Awaiting Review to 6.8
Or maybe implement that error in JS in Gutenberg, and keep the change to allowedMimeTypes in case an unsupported image is uploaded by other means.
I agree, we can improve the error message in Gutenberg. The important part here is preventing uploads when the mime type isn't supported by the service.
I created a new PR (before I found my old one) - https://github.com/WordPress/wordpress-develop/pull/7629. This new PR now covers HEIC
images, so it also fixes https://github.com/WordPress/gutenberg/issues/66293
Marking this for 6.8 early since we are already in RC.
Hey @joomskys - thanks for the bug report and sample image.
I gave your image a test on my server that has AVIF support enabled and the srcset entries were created, which means it is likely your server lacks AVIF support.
Can you check to see if your media handling includes AVIF? Look under Tools->Site Health->Info->Media and check which media editor and formats are supported (search for "AVIF").
I tested again on a site that lacks AVIF support and got the behavior you described - I was able to upload the image, but no subsizes were created.
Interestingly, when I tried uploading the AVIF file in the Media library, I got an error message "This image cannot be processed by the web server. Convert it to JPEG or PNG before uploading." and the image refuxed to upload. So this does feel like a bug to me, the behavior should be consistent - the bug is likely on the Gutenberg (rather than core) side though - the editor should reject your AVIF file when you try to upload it on a site that lacks AVIF support.
Great, you can ask them about enabling AVIF for your site! It may be available only on certain plans or they may need to head from enough customers wanting it to add support.