-
Notifications
You must be signed in to change notification settings - Fork 99
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
Unit test: AVIF image not supported #1518
Comments
@adamsilverstein Similar discuss going here https://core.trac.wordpress.org/ticket/60628 |
Hmm, I'm also seeing other image formats that also "don't have support" which seems wrong, eg:
@mukeshpanchal27 this is standard wp-env, with |
Test run for me locally against my MAMP install (some are failing though), trying with wp-env next. |
Testing with wp-env on my chromebook, I see that Imagick shows avif support on the Tools->Site Health page, but when I upload an AVIF, the srcset images are jpegs. Still trying to see what is happening there, will update here. |
This might actually be a core support detection bug? I thought it might be this line: will return false for support for non jpeg images if However, checking the wp-env build, we do have |
Yes I spend some time to check why unit tests didn't run the Modern Image plugin with WP_ENVFor the array(2) {
["versionNumber"]=> 1809
["versionString"]=>ImageMagick 7.1.1-26 Q16-HDRI aarch64 21914 https://imagemagick.org
} while if i check version in WP site health is show array(2) {
["versionNumber"]=> 1691
["versionString"]=> ImageMagick 6.9.11-60 Q16 aarch64 2021-01-25 https://imagemagick.org
} |
I am also seeing a different environment when running wp-env locally vs. what appears to run in our action. I was able to get this set up for testing on a personal computer where I can run Docker. I suspect the fix here may be updating the environment we use for testing. |
Per our unit tests setup https://github.com/WordPress/performance/blob/trunk/package.json#L52 it will runs on See screenshot for more details: cc. @swissspidy |
So the two Docker images have different ImageMagick versions, is that what you‘re both saying? |
Yes. Also the |
The CLI containers (which are maintained at https://github.com/docker-library/wordpress) use Alpine and only contain the bare minimum needed. I suspect Same for the other PHP versions. |
Thanks for sharing. They already added warning in docker file. Do we needs to close this ticket with closed as not plan or any other way to fix this issue?
|
I understand this comment just as "There is no official support for Alpine, but we're trying to install imagick ourselves anyway". Even the referenced issue Imagick/imagick#328 literally says "To be clear it works, but I don't want to spend time on it"
As I said, I suspect # install the PHP extensions we need (https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions)
+# Note: imagick uses libheif for AVIF support, whereas GD uses libavif for AVIF support
RUN set -ex; \
\
apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
freetype-dev \
icu-dev \
imagemagick-dev \
libjpeg-turbo-dev \
libpng-dev \
libwebp-dev \
+ libheif-dev \
+ libavif-dev \
libzip-dev \
; \
\
docker-php-ext-configure gd \
--with-freetype \
--with-jpeg \
--with-webp \
+ --with-avif \
; \
docker-php-ext-install -j "$(nproc)" \
bcmath \
exif \
gd \
intl \
mysqli \
zip \
; \ |
Thanks. Open PR docker-library/wordpress#919 |
The PR was approved with some minor feedback that I addressed, but I'm unable to run |
Looks like this was recently merged. Amazing work all! |
The unit tests still failing 🤔 Do we needs to wait for sometime to get new changes? https://github.com/WordPress/performance/actions/runs/10842661947/job/30088605828?pr=1517 |
I don‘t have Docker so I can‘t test it, but were those updates already released? When you create a new env locally it gets the new version? If so, then there might be more build changes needed |
It sounded like it was already released, no? Can you compare your image hash with the latest available one? Could also be that the PR wasn‘t sufficuent to add support and that more changes are needed. |
It seems like it working 🥳 for some PHP versions 8.1 to 8.3 but not for some old PHP versions Previously skipped testshttps://github.com/WordPress/performance/actions/runs/10681470364/job/29605168994
Currently skipped testshttps://github.com/WordPress/performance/actions/runs/10897272598/job/30238408456#step:9:291
|
It seems like still we needs to add support for PHP 8.0 and 7.X version. See #1517 PR for more info. |
Per docker image maintainer reply:
I'm going to close the issue and related PR as AVIF is works for 8.1 and higher versions. |
Bug Description
In unit tests, all tests that check AVIF support are being skipped because AVIF support appears to be non-functional in the test environment. However, when I checked AVIF support on the test environment (
http://localhost:8889
), it indicates that "Your site supports AVIF."The unit tests being skipped can be seen here: https://github.com/WordPress/performance/actions/runs/10677521269/job/29592825477#step:9:310. Additionally, in #1517, the AVIF support check shows that it failed.
The text was updated successfully, but these errors were encountered: