kitkat223
Forum Replies Created
-
Hello Meow! Thank you for the response! I am running WordPress 6.6.2. I tried using the ImageMagick Engine plugin to make WordPress use ImageMagick instead, but as soon as I clicked “Build AVIF,” the transparent background of the original PNG image and the AVIF image that it built turned black as well. This also happens to WEBP. I am not sure if this could be due to a PHP compatibility issue, as I am running PHP 8.3. I will try it again with PHP 8.2 and post back.
Thanks again!
- This reply was modified 1 month, 2 weeks ago by kitkat223.
Hello, I think I have narrowed down the issue, it is with the GD Library. I disabled the GD extension and when clicking build avif it throws an error. I checked the PHP log and it is related to imagecreatefromstring(). It seems like the plugin uses GD to build avif. building retina is okay with GD off. Here’s the error code:
.720853 [NOTICE] [1166048] [T0] [127.0.0.1:60616#APVH_example.com:7081] [STDERR] PHP Fatal error: Uncaught Error: Call to undefined function imagecreatefromstring() in?/var/www/vhosts/example.com/httpdocs/wp-content/plugins/wp-retina-2x-pro/classes/engine.php:324\nStack trace:\n#0?/var/www/vhosts/example.com/httpdocs/wp-content/plugins/wp-retina-2x-pro/classes/rest.php(667): Meow_WR2X_Engine->generate_webp_images()\n#1?/var/www/vhosts/example.com/httpdocs/wp-includes/rest-api/class-wp-rest-server.php(1230): Meow_WR2X_Rest->rest_build_webp()\n#2?/var/www/vhosts/example.com/httpdocs/wp-includes/rest-api/class-wp-rest-server.php(1063): WP_REST_Server->respond_to_request()\n#3?/var/www/vhosts/example.com/httpdocs/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch()\n#4?/var/www/vhosts/example.com/httpdocs/wp-includes/rest-api.php(420): WP_REST_Server->serve_request()\n#5?/var/www/vhosts/example.com/httpdocs/wp-includes/class-wp-hook.php(324): rest_api_loaded()\n#6?/var/www/vhosts/example.com/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()\n#7?/var/www/vhosts/example.com/httpdocs/wp-includes/plugin.php(565): WP_Hook->do_action()\n#8?/var/www/vhosts/example.com/httpdocs/wp-includes/class-wp.php(418): do_action_ref_array()\n#9?/var/www/vhosts/example.com/httpdocs/wp-includes/class-wp.php(813): WP->parse_request()\n#10?/var/www/vhosts/example.com/httpdocs/wp-includes/functions.php(1336): WP->main()\n#11?/var/www/vhosts/example.com/httpdocs/wp-blog-header.php(16): wp()\n#12?/var/www/vhosts/example.com/httpdocs/index.php(17): require('/var/www/vhosts...')\n#13 {main}\n thrown in?/var/www/vhosts/example.com/httpdocs/wp-content/plugins/wp-retina-2x-pro/classes/engine.php?on line 324\n
It is possible to make the plugin use ImageMagick to build avif or instruct GD to switch off alpha blending mode for PNGs?
Thank you!
Hello, this also happens when building avif as well