• Hi,
    I have over 2000 + images in Library and installed the plugin to generate 4 other different sizes of existing images. On my localhost install worked (well…from time to time I got an empty red <div> error and generating stopped. Wat that error suppose to say?) but on live server cannot generate thumbnails. Tried to select all sizes, only the one generated, nothing worked, it says that no media to generate. Checked ftp and no versions of that files existed

    The problem might be caused by the fact that I used the get_post_thumbnail (array(110,110),…) before ? I added this plugin when I saw that images were resized by css and not wordpress.

    And one question if you don’t mind: what does the Crop button suppose to do when checked? the crop button from custom image sizes. Thanks

    https://www.ads-software.com/extend/plugins/simple-image-sizes/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Nicolas Juen

    (@rahe)

    Hi,
    Have you tried to regenerate just one media in the media list ?

    Thread Starter reziden7

    (@reziden7)

    Yeah, sorry , forgot to mention that. On media list, single image regeneration works

    Plugin Author Nicolas Juen

    (@rahe)

    Hum… weird, have you some notices on your server ? If the plugin respond “no media to regenerate” there is a chance that the json response is corrupted. Or the json object can be so gigantic ( i get only the id of the medias but it can be this… ) and the browser cannot handle it and say it’s empty…
    If you can ( and know ) check the response of the ajax query on the browser console, if there is some php error on it so this is it !

    The crop button is when you specify the image size, if you check it WordPress will make a hard crop and cut into your image for making the thumbnail. If you do not check it the image will be resized based on the closest width.
    There is an ( better ) explanation in the codex :
    https://codex.www.ads-software.com/Function_Reference/add_image_size#Crop_Mode

    Thread Starter reziden7

    (@reziden7)

    don’t know how to do that. activated the console panel from firebug, saw the request it made but the response was empty. don’t know how to check for php errors on that , but the source code of the admin panel is php warning/error free.
    thanks for explaining the crop thing

    Plugin Author Nicolas Juen

    (@rahe)

    Hi,
    The response was totaly empty or there where an 0 in it ?
    If the response was empty maybe the PHP got an timeout and the server did not display this error so you got a blank response.
    I do not have solution for you now, sorry !
    Try this plugin instead :
    https://www.ads-software.com/extend/plugins/regenerate-thumbnails/
    Working the same but do not make the first query to get the attachment ids by ajax ;).

    Rahe

    Thread Starter reziden7

    (@reziden7)

    Hi again, the result was empty. I will test it by hand and parse variables by hand or script later this day. If I cannot see any errors, I’ll try that plugin.
    Thanks a million for help

    Plugin Author Nicolas Juen

    (@rahe)

    No problem,
    If you have problems with this plugin too and if you know the CLI, you can use this :
    https://github.com/herewithme/wordpress-cli-tools
    There is a file for regenerating the medias from the server console directly, this is faster than the webbrowser ??

    Rahe

    Thread Starter reziden7

    (@reziden7)

    Hi again, sorry I was a little busy. I’m now testing rebuild-thumbs.php .
    This is faster, I can see , I see files are created with and new sizes are included, but getting this error very very often
    An error occured with the media 16319 (updating post meta) (should iI be worried ?).
    I don’t think the code is right, wp_update_attachment_metadata( $attachment->ID, wp_generate_attachment_metadata( $attachment->ID, $fullsizepath ) ) == false shouldn’t it be ==true ? Also tried updated version of the plugin, same error as previous version.
    Hope this script fix problems, get back asap

    Thread Starter reziden7

    (@reziden7)

    I think I solved this one. For unknown reasons (and don’t want to check this out) my hosting has some trouble with this scripts, maybe execution time is to low, or memory…anyways, since I had like ~3000 pictures (some of them re-sized in wordpress default 3 sizes ) and they were gonna have 3 new different sizes, it took enormous time to do all of them. So I changed the script like this (maybe someone has the same problem)

    added this code below the two requirements

    $postsperpage=2;
    if($_GET['start'])
     {
     $offset=(int)$_GET['start'];
     $next=(int)$_GET['start'] + $postsperpage;
     }
    else {
    $offset=1;
    $next=$postsperpage;
    }

    added offset to the end of attachement array
    'offset'=>$offset
    and at the end redirect to same page but from where it ended before

    echo '<script type="text/javascript">
        window.location = "rebuild_me.php?start='.$next.'"
    </script>';

    as far I tested, even with $postsperpage=2 (two images at one load) the page was not redirecting sometimes, so need to change the start value in the url manually.
    also added an if(!empty) before foreach loop so it stops at the end.

    thanks for helping Rahe

    Plugin Author Nicolas Juen

    (@rahe)

    Hi,
    I’m glad you have found a solution !
    I will implement on the next version a contextual button on the media list for regenerating the selected medias on the list.
    And maybe a safe mode in the medias settings page, generating the arry of ids in javascript in the header directly.

    Good luck for the next,
    Rahe.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Simple Image Sizes] No media in your site to regenerate !’ is closed to new replies.