WPIntell

Source evidence

it was good.. now it needs to be updated.

Regenerate Thumbnails · review · 2021-12-06T18:55:00+00:00

praisesentiment
mediumseverity
0.61relevance
5replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

5 / 28 rows with source links

17.9% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

23 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

review · 5 stars
cemserdar unresolved
it 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

Comments

5 shown
Gaurav 2021-12-10T09:56:00+00:00

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

Nabil Lemsieh 2021-12-29T15:14:00+00:00

@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 .

Jay 2021-12-29T19:36:00+00:00

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!

logotronic 2022-02-16T14:06:00+00:00

Hi all I have same problem, found the issue here, still open

Alba 2022-02-18T17:18:00+00:00

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