Conversation
review · 5 starsit was good.. now it needs to be updated. it took my time several times after i crop some images on the wp media library and after i regenerate thumbnails by this plugin, everything was deleted that i cropped…
Hi @cemserdar, Thanks for reaching out, and I am sorry to hear about the issues you are facing with the plugin. Can you give us some more details and a few steps on what exactly happened? I can then recreate the same on my test website and submit a detailed report to our developers to help fix the issue. If you like, you can also submit the report directly to our developers here https://github.com/Automattic/regenerate-thumbnails/issues
@gaurav984 When you upload a big image big-image.jpg , WP downscales it and save it under big-image-scaled.jpg . The metadata will looks like this: [ "file" => "2021/12/big-image-scaled.jpg", "original_image" => "big-image.jpg" //... ] When you edit the image, WP replaces the big-image-scaled.jpg with big-image-scaled-e1640788653513.jpg , then the metadata will become: [ "file" => "big-image-scaled-e1640788653513.jpg", "original_image" => "big-image.jpg" //... ] Since the plugin regenerate thumbnails based on the original image big-image.jpg (see code snippet below), the edited one is ignored, which explains the problem reported by @cemserdar . if ( function_exists( 'wp_get_original_image_path' ) ) { $fullsize = wp_get_original_image_path( $post->ID ); } else { $fullsize = get_attached_file( $post->ID ); } File: regenerate-thumbnails.php, line: 395 In order to regenerate thumbnails based on the edited image, the code above needs to be changed to something like this: $fullsize = get_attached_file( $post->ID ); $image_edited = preg_match( '/scaled-e\d+\.[A-Za-z]+$/', wp_basename( $fullsize ) ); if( ! $image_edited && function_exists( 'wp_get_original_image_path' ) ) { $fullsize = wp_get_original_image_path( $post->ID ); } This reply was modified 4 years, 5 months ago by Nabil Lemsieh .
Hi @nlemsieh , Thank you so much for the detailed bug report. I have escalated this to our developers to take a look, and we’ll keep you posted as soon as we have updates!
Hi all I have same problem, found the issue here, still open
Hi @logotronic Could you please add your +1 to the bug report ? Unfortunately, there’s still no ETA for this issue. I recommend following the bug report for any updates, or feel free to check back with us for a status update. Thanks, Alba
Hi @cemserdar, Thanks for reaching out, and I am sorry to hear about the issues you are facing with the plugin. Can you give us some more details and a few steps on what exactly happened? I can then recreate the same on my test website and submit a detailed report to our developers to help fix the issue. If you like, you can also submit the report directly to our developers here https://github.com/Automattic/regenerate-thumbnails/issues
@gaurav984 When you upload a big image big-image.jpg , WP downscales it and save it under big-image-scaled.jpg . The metadata will looks like this: [ "file" => "2021/12/big-image-scaled.jpg", "original_image" => "big-image.jpg" //... ] When you edit the image, WP replaces the big-image-scaled.jpg with big-image-scaled-e1640788653513.jpg , then the metadata will become: [ "file" => "big-image-scaled-e1640788653513.jpg", "original_image" => "big-image.jpg" //... ] Since the plugin regenerate thumbnails based on the original image big-image.jpg (see code snippet below), the edited one is ignored, which explains the problem reported by @cemserdar . if ( function_exists( 'wp_get_original_image_path' ) ) { $fullsize = wp_get_original_image_path( $post->ID ); } else { $fullsize = get_attached_file( $post->ID ); } File: regenerate-thumbnails.php, line: 395 In order to regenerate thumbnails based on the edited image, the code above needs to be changed to something like this: $fullsize = get_attached_file( $post->ID ); $image_edited = preg_match( '/scaled-e\d+\.[A-Za-z]+$/', wp_basename( $fullsize ) ); if( ! $image_edited && function_exists( 'wp_get_original_image_path' ) ) { $fullsize = wp_get_original_image_path( $post->ID ); } This reply was modified 4 years, 5 months ago by Nabil Lemsieh .
Hi @nlemsieh , Thank you so much for the detailed bug report. I have escalated this to our developers to take a look, and we’ll keep you posted as soon as we have updates!
Hi all I have same problem, found the issue here, still open
Hi @logotronic Could you please add your +1 to the bug report ? Unfortunately, there’s still no ETA for this issue. I recommend following the bug report for any updates, or feel free to check back with us for a status update. Thanks, Alba