Hi, I am trying to delete all pdf thumbnails, while regenerating thumbnails for images. I have about 40,000 files in my media library which are mostly pdfs, and none of them need image previews.
I have code in my function.php to disable pdf generation when they are uploaded:
/*=== Disable Thumbnail Generation for PDFs */
function wpb_disable_pdf_previews()
{
$fallbacksizes = array(); return $fallbacksizes;
}
add_filter('fallback_intermediate_image_sizes', 'wpb_disable_pdf_previews');
Is it possible to do something similar with this plugin so that existing thumbnails for pdfs are removed, and none are regenerated when running Force Regenerate?
Thanks!
Hello, thank you for providing such good plugin development.
i’m having a task of setting uploads to CDN, upon done the file transfer(without thumbnails), i would have to regenerate thumbnail from the original images, that are actually stored within the external server directory, at CDN service.
Currently, the setup of CDN is fully supporting uploading with also thumbnails on upload generating, via several WP builtin media filters. Now to use your plugin within this specific setup, i’ve read through the advanced filters scripts you’ve posted at GitHub , so my question is, considering the provided snippet :
// add_filter( ‘regenerate_thumbs_original_image’, ‘my_frt_original_image’ );
function my_frt_original_image( $original_path ) {
if ( false !== strpos( $original_path, ‘bad_original’ ) ) {
return false;
}
return $original_path;
}
-can i set effectively the remote server location as the $original_path //=’cdn.example.com/’ , considering the already explained fully functioning remote upload transferring ? The $original_path set value would only serve as the source locations of the original unscaled images, while the upload part would be handled by the functions of other, the CDN plugin, do you have any suggestion on attaching event/hook with that other function?
Thank you for any further information
]]>would it be possible to regenerate the thumbs with our watermark?
]]>Tried to regenerate one single image and I’m getting the following error: Cannot load force-regenerate-thumbnails.
Does anybody has an idea what’s going on?
]]>Hi. trying to regenerate thumbnails after disabling some sizes, totally 100k media files. unfortunatelly after 10 hours script already stopped twice. every time it reruns the same thumbnails again (from newest). anything i can do? one file taking around 3s so it should run constantly for 3 days
]]>Hi, I have a lot of pages and a lot of articles added per month. Is it possible to somehow set up an automatic action so that the plugin runs e.g. once a day via cron or somehow run it differently without logging into the panel?
]]>My media images are offloaded to DigitalOcean spaces. Regeneration doesn’t work, says “file not found”.
]]>I have a problem where the Media list view works for my files but the grid view doesn’t render anything.
That led me to download this plugin, but when I run it I get:
I’ve enabled all the debugging methods but WordPress doesn’t error???
WordPress 6.5.3 on PHP 8.1.2
Please help, it’s a brand new server…
]]>does Force Regenerate Thumbnails work with .webp images
]]>Hi, thank you for a great plugin!
The theme uses images, which are stored in its assets folder.
I’m stuck with the one size that they have made.
Same issue with any plugin.
Would be super useful if images that are not in the WP Media Uploads folder would also get thumbnails
Please, consider adding this feature
Thank you!
]]>Hi,
Thank you for the great plugin!
I removed a few thumbnail sizes from my website and used your plugin to remove all the no longer used thumbnails.
That worked on my local machine but not on the live website. After a closer inspection of its code, I noticed that the $file_info used on line 546 of class-forceregeneratethumbnails.php is not previously set. That made the code not delete any images by skipping the unlink action.
The problem was sorted after I added
$file_info = pathinfo( $image_fullpath );
before the
$thumb_fullpath = trailingslashit( $file_info['dirname'] ) . wp_basename( $size_data['file'] );
Please have a look.
Best regards,
Giannis
Hi, testing out your plugin ??
so it regenerates all the sizes my theme is using but also regenerate some other sizes also, these ones: : 100×100, 1536×864, 300×300, 600×338, 768×432
any ideas why and how can i stop it?
Hello!
I’ve got a setup that uses Custom Image Sizes by 99 Robots to create sizes, Crop-Thumbnails so that we can modify them, and EWWW Image Optimizer to optimize the files. However, there are a few discrepancies where some older articles don’t have a certain file size created and while I could use the Crop-Thumbnails plugin to generate them individually, I was looking for a solution that could automatically loop through the images in the library and generate just the missing sizes without affecting the existing ones (and hopefully EWWW Image Optimizer would pick up on the size being newly created and optimize it automatically too).
There’s over 8k items in the media library and 20 registered sizes, so I imagine it might need to be done in batches since one long script might time out.
I know it’s not a feature available in your plugin now, but do you think it might be added? If not, I’ll figure something else out. Thanks!
]]>I have my media settings at 150×150 for thumbnails. However after running it nicely delete various other unwanted sizes but it regenerates 100×100 (in addition to the expected 150×150)
Is there any way to make it also delete the 100×100 (no pages are using images of this size)
Thanks
]]>I ran this plugin for the first time. I have a lot of images and it took a few hours. The first 3000ish images worked fine. Then it skipped about 1000 images saying just error 0, then it finished the final 2000 images with no issues.
When the error 0 happened, it provided no image ID like it does when there are some other errors.
Any ideas?
]]>hi great plugin btw, Buti see during the run its deleting certain thumbnails but still keeping five of the default thumbnails. Anyway to delete those as well? Or am I gonna get empty images on posts?
thx
]]>This doesn’t appear to work for PDFs. I’ve had this issue with previous plugins too, only found one that could actually do it but it was a larger plugin for image/thumbnail refinement. Was looking for something quick & simple. Not sure if you’ve tested with PDF thumbnail regeneration or not but figured I’d ask before going back to the other plugin.
]]>Hi!
I have a site that is selling digital files, like PDF and DOCX…
All the files are uploades to woocommerce_uploads folder containing tear and month folders (woocommerce_uploads\year\month)
Is it possible to remove all existing image sizes generated in those folders?
Or
Regenerte only two image sizes and remove all others previously generated sizes?
As for now i tested your plugin and it only regenerates the thumbnails and is not deleting old ones.
]]>Looks like there (still) is a bug for images that are edited in the WP backend and then regenerated with this plugin. For example, if you rotate an image and then regenerate the thumbnails, then the source image is resetted back to the original image instead of the rotated image.
There are the steps to reproduce the problem:
We’ve tried that on different installations, even installations without any other plugins, and its still the same behaviour.
I hope you can reproduce the problem and provide a fix soon
]]>I’m doing some troubleshooting where images I’m bringing in from Flickr via another plugin (Justified Image Grid) are loading slowly. So, I’d like to know why I might use this plugin on my WP site. Might it affect images I am dynamically bringing in to my site (as per above) or is this just for images that have been uploaded directly into my media library?
What effect does this plugin have on thumbnails? Why would I use it?
Thanks.
]]>I would like to have this plugin rebuild thumbnails from a custom plugin where I have the details about a particular image. Is there any way to do this please. Essentially I would like the programmatically click the “Force Regenerate Thumbnails”?link that I see on the media library admin screen.
Thanks so much.
I use Media Library Folders plugin to move images our of the usual year-month folders and into custom folders for each blog post. Will Force Regenerate Thumbnails also work with images found in other folders in /wp-content/uploads/?
]]>My business-website looks like that now:
https://die-contentakademie.at/wp-content/uploads/2023/05/fehler.png
I have white space instead of images… What happened? Will take several hours to repair that. Hope I will find all pictures.
The theme (Septera) recommends this plugin. But now I have a problem
Greetings, Brisch
Hello.
Is there any kind of documentation available? Thanks a lot.
]]>Hi,
is there a possibility to add filter/settings for skip image when it have all sizes right – so if image have all sizes ok, then will be image skipped and not regenerated in Tools -> Regenerate All Thumbnails ?
Secondly if there is a way how add to url same GET param which indicate where in process we are – I have large website with many thousand of images and there will be probably some downtime in process and in this case I must run regeneration from start – I think that here is enough add some param like offset
Thanks a lot
]]>May I know if Force Regenerate Thumbnails will continue to run in the background if I close the window during Regenerate All Thumbnails process? Or do I need to keep the window open?
]]>Hello. Attempting to use this plugin but receiving, “Failed: The imagick extension is required for PDF files.” Is this normal? Is there a solution for this?
]]>Hello! I’m starting photo processing. The part happens normally. But then an error pops up:
parsererror: 200 SyntaxError: Unexpected token '/', "/home/user"... is not valid JSON
Where can I see a way out of the situation?
]]>I have a huge site. In the uploads folder, I have a big quantity of folders by the date. Each folder has a huge quantity of images. Is it possible to point the plugin through some function to a specific folder?
]]>“Force Regenerate Thumbnails” is its plugin name, but it has a precise meaning when this string shows on the WordPress Dashboard. In some languages, like zh_TW, the translators don’t translate the plugin’s name but need to translate the plugin’s UI strings, so I made some modifications for this issue.
All modifications are based on 2.1.1.
class-forceregeneratethumbnails.php, line 71 and 72
_x( 'Force Regenerate Thumbnails', 'UI Strings', 'force-regenerate-thumbnails' ),
_x( 'Force Regenerate Thumbnails', 'UI Strings', 'force-regenerate-thumbnails' ),
Line 244
$actions['regenerate_thumbnails'] = '<a href="' . esc_url( $url ) . '" title="' . esc_attr__( 'Regenerate the thumbnails for this single image', 'force-regenerate-thumbnails' ) . '">' . _x( 'Force Regenerate Thumbnails', 'UI Strings', 'force-regenerate-thumbnails' ) . '</a>';
Line 266
$actions['bulk_force_regenerate_thumbnails'] = _x( 'Force Regenerate Thumbnails', 'UI Strings', 'force-regenerate-thumbnails' );
Line 335
<h2><?php echo esc_html_x( 'Force Regenerate Thumbnails', 'UI Strings', 'force-regenerate-thumbnails' ); ?></h2>
]]>