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

avif and jpg XL greyed out #36

Open
myedgy opened this issue Dec 3, 2022 · 11 comments
Open

avif and jpg XL greyed out #36

myedgy opened this issue Dec 3, 2022 · 11 comments

Comments

@myedgy
Copy link

myedgy commented Dec 3, 2022

Hello,

First of all thanks for this plugin.
Do I need to install something special on my dedicated server, before I can select Avif from the dropdown menu?

Currently, its greyed out.

@adamsilverstein
Copy link
Owner

Hey @myedgy you need to have a server that supports the formats. If the option is greyed out, it is likely your server doesn't support the format. I'm not sure which hosts support AVIF, you will need to run on PHP 8.1 to get AVIF support.

You can also check which formats your server supports under Tools->Site Health->Info(tab)->Media Handling.

@myedgy
Copy link
Author

myedgy commented Dec 8, 2022

Hello I have an dedicated server in full control. What should i need to install except php 8.1 (php 8.1 in already installed, but not elemontor is not compatible yet.) I will test it on a new wordpress install.

I have a avif convert libary installed to but that didn't worked.

@myedgy
Copy link
Author

myedgy commented Dec 9, 2022

So I installed a fresh wordpress on Php 8.1.13 on Debian 11
And it's still grayed out.

  • libavif-dev is installed too.
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    libavif-dev is already the newest version (0.8.4-2+deb11u1).
    0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.

At Media Handeling
GD supported file formats | GIF, JPEG, PNG, WebP, BMP, AVIF

In the list of ImageMagick supported file formats its not listed.

@cvladan
Copy link

cvladan commented Jan 26, 2023

Although you have probably already resolved this issue, here is some additional information:

To enable AVIF, GD extension must be compiled with AVIF support. Additionally, it depends on libavif package, but that you already have installed. Please refer to the following article: AVIF image support in PHP 8.1

@myedgy
Copy link
Author

myedgy commented Jan 26, 2023

Nope it's not solved yet. I did that step, will try it again.

@adamsilverstein
Copy link
Owner

adamsilverstein commented Jul 18, 2023

@myedgy I suggest checking under Tools->Site Health->Info->Media to verify the supported formats for your server.

Oh - I see you say GD supports AVIF, that should make the option available. Are you on the latest version of core? some bugs were fixed that could break support if only one engine supports a format.

@koech-v
Copy link

koech-v commented Oct 8, 2023

@adamsilverstein Thank you for this plugin.

AVIF option is still greyed out yet GD supported file formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM exists under Tools > Site Health > Info. Running PHP version 8.1 and latest WP version.

@adamsilverstein
Copy link
Owner

@koech-v - can you try activating this Gist as an mu plugin to see if that fixes the grayed out issue?

https://gist.github.com/adamsilverstein/c8b5d0145aeda7fe0a04e4573f2c7c32

@adamsilverstein
Copy link
Owner

adamsilverstein commented Oct 27, 2023

Actually, I was able to reproduce this on a test server - it looks like _wp_image_editor_choose still isn't returning the correct editor. I updated the plugin in 1.2.0 to fall back to GD even when core returns no editor for the mime type. I'll try to look into this further in core; in the meantime can you please give 1.2.0 a test?

@adamsilverstein
Copy link
Owner

https://core.trac.wordpress.org/ticket/59760 will fix the issue for AVIF detection in GD.

JPEGXL detection isn't possible yet for this plugin since we rely on server side PHP support and JPEGXL isn't supported yet in PHP as far as I can tell.

@koech-v
Copy link

koech-v commented Oct 28, 2023

I updated the plugin and AVIF option is no longer greyed out and have set it as such, but image output is still as it was. I hope the ticket you just shared to WordPress Core will fix it in a future WordPress update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants