patrikmuse
Forum Replies Created
-
Forum: Plugins
In reply to: [Modern Image Formats] image typeOkay, all clear, but this behavior with converted images leads the plugins to unexpected responses, like this:
[10-Nov-2024 02:45:08 UTC] PHP Warning: Trying to access array offset on value of type bool in/public_html/wp-content/plugins/revslider/includes/aq-resizer.class.php on line 99 [10-Nov-2024 02:45:08 UTC] PHP Warning: Trying to access array offset on value of type bool in /public_html/wp-content/plugins/revslider/includes/aq-resizer.class.php on line 100
If I upload an image in webp or avif format, the plugin works correctly, but if I convert it with yours, this happens, and I can’t understand why. I get extreme spam of these warnings.
The code part is this// Check if $img_url is local.
if ( false === strpos( $url, $upload_url ) ) return false;// Define path of image.
$rel_path = str_replace( $upload_url, '', $url );
$img_path = $upload_dir . $rel_path;
// Check if img path exists, and is an image indeed.
if ( ! file_exists( $img_path ) or ! @getimagesize( $img_path ) ) return false;
// Get image info.
$info = pathinfo( $img_path );
$ext = $info['extension'];
list( $orig_w, $orig_h ) = getimagesize( $img_path );
// Get image size after cropping.
$dims = image_resize_dimensions( $orig_w, $orig_h, $width, $height, $crop );
line 99 $dst_w = $dims[4];
line 100 $dst_h = $dims[5];Forum: Plugins
In reply to: [Modern Image Formats] image typehttps://phpfci.ksport.kgroup.eu/avifbug.png
you can see the image in media from my wordpress- This reply was modified 4 months, 2 weeks ago by patrikmuse.
Forum: Plugins
In reply to: [Modern Image Formats] image typeThese are the metadata of an image converted with your plugin. Some sources remain as
image/jpeg
instead ofimage/avif
, causing issues with certain plugins, such as this section of code from RevSlider:// Check if $img_url is local.
if ( false === strpos( $url, $upload_url ) ) return false;// Define path of image. $rel_path = str_replace( $upload_url, '', $url ); $img_path = $upload_dir . $rel_path; // Check if img path exists, and is an image indeed. if ( ! file_exists( $img_path ) or ! @getimagesize( $img_path ) ) return false; // Get image info. $info = pathinfo( $img_path ); $ext = $info['extension']; list( $orig_w, $orig_h ) = getimagesize( $img_path ); // Get image size after cropping. $dims = image_resize_dimensions( $orig_w, $orig_h, $width, $height, $crop ); $dst_w = $dims[4]; $dst_h = $dims[5];
Give this warning[05-Nov-2024 14:25:55 UTC] PHP Warning: Trying to access array offset on value of type bool in /home/fcitestadm1n/public_html/wp-content/plugins/revslider/includes/aq-resizer.class.php on line 99
[05-Nov-2024 14:25:55 UTC] PHP Warning: Trying to access array offset on value of type bool in /home/fcitestadm1n/public_html/wp-content/plugins/revslider/includes/aq-resizer.class.php on line 100
a:8:{s:5:”width”;i:2000;s:6:”height”;i:1333;s:4:”file”;s:50:”2024/11/WhatsApp-Image-2024-11-03-at-17.09.20.jpeg”;s:8:”filesize”;i:290692;s:5:”sizes”;a:11:{s:9:”thumbnail”;a:6:{s:4:”file”;s:50:”WhatsApp-Image-2024-11-03-at-17.09.20-150×150.avif”;s:5:”width”;i:150;s:6:”height”;i:150;s:9:”mime-type”;s:10:”image/avif”;s:8:”filesize”;i:9060;s:7:”sources”;a:1:{s:10:”image/avif”;a:2:{s:4:”file”;s:50:”WhatsApp-Image-2024-11-03-at-17.09.20-150×150.avif”;s:8:”filesize”;i:9060;}}}s:6:”medium”;a:6:{s:4:”file”;s:50:”WhatsApp-Image-2024-11-03-at-17.09.20-300×200.avif”;s:5:”width”;i:300;s:6:”height”;i:200;s:9:”mime-type”;s:10:”image/avif”;s:8:”filesize”;i:19674;s:7:”sources”;a:1:{s:10:”image/avif”;a:2:{s:4:”file”;s:50:”WhatsApp-Image-2024-11-03-at-17.09.20-300×200.avif”;s:8:”filesize”;i:19674;}}}s:12:”medium_large”;a:6:{s:4:”file”;s:50:”WhatsApp-Image-2024-11-03-at-17.09.20-768×512.avif”;s:5:”width”;i:768;s:6:”height”;i:512;s:9:”mime-type”;s:10:”image/avif”;s:8:”filesize”;i:69315;s:7:”sources”;a:1:{s:10:”image/avif”;a:2:{s:4:”file”;s:50:”WhatsApp-Image-2024-11-03-at-17.09.20-768×512.avif”;s:8:”filesize”;i:69315;}}}s:5:”large”;a:6:{s:4:”file”;s:51:”WhatsApp-Image-2024-11-03-at-17.09.20-1024×682.avif”;s:5:”width”;i:1024;s:6:”height”;i:682;s:9:”mime-type”;s:10:”image/avif”;s:8:”filesize”;i:102342;s:7:”sources”;a:1:{s:10:”image/avif”;a:2:{s:4:”file”;s:51:”WhatsApp-Image-2024-11-03-at-17.09.20-1024×682.avif”;s:8:”filesize”;i:102342;}}}s:9:”1536×1536″;a:5:{s:4:”file”;s:52:”WhatsApp-Image-2024-11-03-at-17.09.20-1536×1024.avif”;s:5:”width”;i:1536;s:6:”height”;i:1024;s:9:”mime-type”;s:10:”image/avif”;s:8:”filesize”;i:177456;}s:14:”post-thumbnail”;a:5:{s:4:”file”;s:50:”WhatsApp-Image-2024-11-03-at-17.09.20-360×210.avif”;s:5:”width”;i:360;s:6:”height”;i:210;s:9:”mime-type”;s:10:”image/avif”;s:8:”filesize”;i:22427;}s:27:”konte-post-thumbnail-medium”;a:5:{s:4:”file”;s:50:”WhatsApp-Image-2024-11-03-at-17.09.20-580×400.avif”;s:5:”width”;i:580;s:6:”height”;i:400;s:9:”mime-type”;s:10:”image/avif”;s:8:”filesize”;i:48635;}s:26:”konte-post-thumbnail-large”;a:5:{s:4:”file”;s:50:”WhatsApp-Image-2024-11-03-at-17.09.20-750×420.avif”;s:5:”width”;i:750;s:6:”height”;i:420;s:9:”mime-type”;s:10:”image/avif”;s:8:”filesize”;i:58244;}s:31:”konte-post-thumbnail-navigation”;a:5:{s:4:”file”;s:49:”WhatsApp-Image-2024-11-03-at-17.09.20-100×68.avif”;s:5:”width”;i:100;s:6:”height”;i:68;s:9:”mime-type”;s:10:”image/avif”;s:8:”filesize”;i:4076;}s:30:”konte-post-thumbnail-shortcode”;a:5:{s:4:”file”;s:50:”WhatsApp-Image-2024-11-03-at-17.09.20-450×300.avif”;s:5:”width”;i:450;s:6:”height”;i:300;s:9:”mime-type”;s:10:”image/avif”;s:8:”filesize”;i:34459;}s:12:”tg-landscape”;a:5:{s:4:”file”;s:50:”WhatsApp-Image-2024-11-03-at-17.09.20-800×600.avif”;s:5:”width”;i:800;s:6:”height”;i:600;s:9:”mime-type”;s:10:”image/avif”;s:8:”filesize”;i:76180;}}s:10:”image_meta”;a:12:{s:8:”aperture”;s:1:”0″;s:6:”credit”;s:0:””;s:6:”camera”;s:0:””;s:7:”caption”;s:0:””;s:17:”created_timestamp”;s:1:”0″;s:9:”copyright”;s:0:””;s:12:”focal_length”;s:1:”0″;s:3:”iso”;s:1:”0″;s:13:”shutter_speed”;s:1:”0″;s:5:”title”;s:0:””;s:11:”orientation”;s:1:”0″;s:8:”keywords”;a:0:{}}s:7:”sources”;a:1:{s:10:”image/jpeg“;a:2:{s:4:”file”;s:47:”WhatsApp-Image-2024-11-03-at-17.09.20-jpeg.avif”;s:8:”filesize”;i:251587;}}s:14:”original_image”;s:42:”WhatsApp-Image-2024-11-03-at-17.09.20.jpeg”;}Forum: Plugins
In reply to: [Modern Image Formats] image typecan anyone help me?
is it a normal behavior of the plugin that the file type remains image/jpeg after conversion or it only happens to me- This reply was modified 4 months, 2 weeks ago by patrikmuse.
Forum: Plugins
In reply to: [AVIF, WebP Converter] Convert and delete the original images (on upload)+1 for this… we have 16k images and we cant keep 2 version of the same image…
tnks a lot for your workForum: Reviews
In reply to: [Modern Image Formats] image typethe avif too…
filename:?Il-successo-del-dilettante-Cristian-Cominelli-jpg.aviftype:?image/jpeg
Dimensione del file: 395 KB
Dimensioni: 2048 per 1365 pixel
Forum: Reviews
In reply to: [Modern Image Formats] image typeno, the extension changed correctly
File name: progetto-giovani-2-scaled.webpFile type: ?image/jpeg
Dimensione del file: 356 KB
- This reply was modified 4 months, 2 weeks ago by patrikmuse.
Forum: Plugins
In reply to: [Autoptimize] Revolution Slider / Frontend Engine SR7Same problem, but I’m not sure if it’s an issue with “Slider Revolution.” I’ve tried every way to exclude the plugin’s JavaScript from optimization, but it still gets optimized. I think it might be something that made the plugin compatible with the older version, which is breaking the new one. However, I could obviously be wrong.