• We’ve used this plugin on several sites now, and on a few of them we’ve had major slowdown issues on the site, and deactivating this plugin was the only fix.

    I can’t say what the sites had in common, but they all ended up taking about 7 seconds to load a page. Deactivating the plugin instantly solved it.

    Until this is fixed we cannot use this otherwise fantastic plugin any more. Do you have any ideas?

    https://www.ads-software.com/plugins/otf-regenerate-thumbnails/

Viewing 3 replies - 1 through 3 (of 3 total)
  • joe2night

    (@joe2night)

    Here is a fix. You must open the plugin file, and replace the line:

    $imagePath = preg_replace( '/^(.*)\.' . $imageExt . '$/', sprintf( '$1-%sx%s.%s', $size[0], $size[1], $imageExt ) , $imagePath );

    with this:

    $original_size = getimagesize($imagePath);
    			$sizes = image_resize_dimensions($original_size[0], $original_size[1], $size[0], $size[1], true);
    			if(empty($sizes)) {
    				$imagePath = preg_replace( '/^(.*)\.' . $imageExt . '$/', sprintf( '$1-%sx%s.%s', $size[0], $size[1], $imageExt ) , $imagePath );
    			} else {
    				$imagePath = preg_replace( '/^(.*)\.' . $imageExt . '$/', sprintf( '$1-%sx%s.%s', $sizes[4], $sizes[5], $imageExt ) , $imagePath );
    			}

    Thread Starter Shaun Robinson

    (@rubious)

    Thanks but that did not work ?? the page still takes 15 seconds to load with the plugin activated.

    joe2night

    (@joe2night)

    The slowdown is caused by the plugin generating images.
    Once the images are generated (during the first page load), it should not cause slowdown any more.
    If it still causes, it means, that it’s regenerating the images on every page load.
    Without the fix, it could happen if one used an array of pixel dimensions for image size, and not a string named size. With the fix it shoud not happen any more.
    If it still happens, maybe there are file permission problems? Or the memory is not enough to resize the images?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Causes major slowdown’ is closed to new replies.