Forums

Need more image sizes for your blog? Here's a plugin (3 posts)

  1. waltervos
    Member
    Posted 1 month ago #

    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).

  2. catnip216
    Member
    Posted 4 weeks ago #

    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

  3. waltervos
    Member
    Posted 3 weeks ago #

    @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

Reply

You must log in to post.

About this Topic