Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
regenerate_thumbnails
#1
This plugin regenerates thumbnails when you change the default thumbnail size in gsconfig.php. The plugin uses built-in GetSimple scripts to manage images.
Regenerate Thumbnails allows you to regenerate all thumbnails for all uploaded images in your data/uploads folder and sub folder.
http://get-simple.info/extend/plugin/reg...ails/1373/
How use Regenerate Thumbnails on your files?
This is useful in situations such as:
  • The thumbnail size has changed and you want previous uploads to have a thumbnail of this size.
  • You've moved to a new GetSimple theme that uses thumbnail images of a different size.
  • In order to free up space on the server you can delete old, unused thumbnails from the data/thumbs folder and sub folder.
Reply
#2
Salut @jjancel

Using your regenerate_thumbnails, I found two issues. (in inc/imagemanipulation.php)

1. mkdir() for creating empty folders
2. Doesn't get thunbnails from .jpeg

1. Your "loop" stops if there is an empty (w/o images) folder, BUT w/ subfolders (including images)

First I tried  a workaround for 1. to leave the core function untouched.
But I found issue 2.
2. function genStdThumb() doesn't create thumbs for .jpeg (not .jpg) Sadly only sometimes :-O


Easy solution (I think):
1.:
34 mkdir($thumbsPath, $chmod_value);
mkdir($thumbsPath, $chmod_value, true);

2.
75     switch(lowercase(pathinfo($targetFile)['extension'])) {
        case "jpeg":
        case "jpg":
            $bool2 = imagejpeg($picture,$thumbnailFile,85);

But core changes are necsessary. But this is a thing for the core developers.
Tested with GSCE cutting edge (3.3.20?)
Looked at GS 3.3.16
Russian version: I don't know. Maybe @Oleg can have a look.


(Workaround gets obsolete, while copied and expanded genStdThumb() into local_genStdThumb() )
Here is my developers version including workaround (obsolete) AND local_genStdThumb():

Please remove all //jf: comments
https://github.com/jowolke7/GS-regenerate_thumbnails
Reply
#3
@joffer What core changes are necessary? Maybe we can add this in the final v3.3.20 release.
Or PM me what you have or what you would suggest, and I can add the updated plugin to the CE repo.


GS Community Edition with php8.x compatibility, new features and much more!  Support Me


Reply




Users browsing this thread: 1 Guest(s)