• I just released my new plugin, called ‘Additional image sizes’. You can download it from here. I’d like to get some feedback to see how I can improve it.

    With this plugin, users can add and remove intermediate image sizes. The plugin can also make copies of existing images with these new sizes. Users will be able to use the images in their posts or use them in their theme with the use of the ‘Get the image’ plugin (this is the use case I had in mind mostly).

Viewing 8 replies - 1 through 8 (of 8 total)
  • The plugin works great, I can see the new image sizes in my upload folder, but I was just wondering how exactly to call them into your theme with the “Get the Image” plugin.

    Is it something like this?
    <?php if ( function_exists( 'get_the_image' ) ) { get_the_image( 'default_size=my_new_image_size' ); } ?>

    Thanks in advance.
    -Amanda

    Thread Starter waltervos

    (@waltervos)

    @catnip216 I’m glad to hear that it works for you. This is the code that I have in my theme:

    <?php if (function_exists('get_the_image')) { echo get_the_image('default_size=blogindex&width=220&height=140'); } ?>

    Where blogindex is the name of the size. I’m not sure why I have the width and height parameters as well.

    Hope this helps!

    Edit: Those width and height parameters are used as attributes for the <img> element. They’re not necessary

    Is there any way to run this function on ALL images uploaded in one go?

    I keep getting this message:

    Not quite finished yet. We had to stop the script midway because it had been running for too long. Just press the button again to continue where we left off.

    And only a few (3-10) images has been resized, sometimes (more like most of times) none has been resized…

    I have about 200 posts in my photoblog, and having to do this for only a few images at a time takes forever…

    Thread Starter waltervos

    (@waltervos)

    Is there any way to run this function on ALL images uploaded in one go?

    On line 387 of the plugin file, replace break; with //break;. That should do the trick.

    I’ll see what I can do to improve this function in the next update.

    – Walter

    Edit: To be sure, look for this piece of code:

    if ($max_execution_time - $current_execution_time < 2) {
        break;
    }

    Any chance have any guesses why this won’t work in wordpress mu? It installs fine, and I can add sizes just fine, and they show up in the add image screen, but when I go to upload, none of the images are uploaded other than thumbnail and full size, and it’s not added to the gallery.

    Thread Starter waltervos

    (@waltervos)

    Any chance have any guesses why this won’t work in wordpress mu?

    I really don’t know anything about WP MU, sorry! I don’t really have the time to look into it right now. Maybe 3.0 will fix this? Because of the merge I mean.

    Is there a way this could work without ‘Get the image’ plugin? Ideally, to make it work with wp_get_attachment_image_src( $id, $size ) or at least provide your own function, like get_additional_image( $image, $size )

    Edit: nevermind, I’ll be using it with the ‘Get the image’ plugin.

    Thread Starter waltervos

    (@waltervos)

    Hi Dartanjan,

    There’s no need to use the Get the image plugin. You can use your own function for retrieving images, use a different plugin or use WP 2.9’s built in thumbnail functions. Providing a function for that is beyond the scope of this plugin though.

    Walter

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Need more image sizes for your blog? Here’s a plugin’ is closed to new replies.