WordPress.org

Ready to get started?Download WordPress

Forums

Help: add_image_size and image cropping (6 posts)

  1. Beer
    Member
    Posted 3 years ago #

    I have added this in functions, and used the Ajax rebuilder to build these images.
    add_image_size( 'homepage-thumb', 400, 100, true );

    An unwanted side-effect is that now if I go to edit an image, it displays the 400x100 image instead of the full size image for cropping. Thoughts?

  2. Beer
    Member
    Posted 3 years ago #

    Upon reading this link below...
    http://wordpress.stackexchange.com/questions/11651/why-cant-i-edit-certain-images-from-the-wordpress-media-library

    It seems that a plugin may have caused this side effect. Even though the plugin was deactivated after using it. The plugin was AJAX Thumbnail Rebuild. I used to create the new homepage-thumb sizes 400x100.

  3. Beer
    Member
    Posted 3 years ago #

    When rebuilding, I selected to have it only rebuild the new image size that I added. This may have caused the issue. I left all choices selected for the rebuild a 2nd time around and this still hasn't fixed the issue.

    I've installed Scissors Continued plugin for now, as it allows me to create a manual crop for the homepage-thumb.

  4. g3legacy
    Member
    Posted 3 years ago #

    Im going to be trying some other stuff with too, I think add_image_size in the functions.php file adds the new image in upload. You can call a custom image size from inside a template too, with get_post_thumbnail - you can specify a size, im wondering if this allows you to edit the image after upload and still see the effect with the requested size - if that makes sense!

    Dan

  5. Beer
    Member
    Posted 3 years ago #

    Yes, add_image_size creates the new image size on upload. Not get_post_thumbnail, but 'the_post_thumbnail' returns the image src html if the image exists.

    This works
    add_image_size( 'homepage-thumb', 400, 100, true );

    and this works
    the_post_thumbnail('homepage-thumb');

    but when I go to edit the full size image to manually crop it, I am only seeing the new 400x100 image to crop.

    Scissors Continued plugin works as desired, while WordPress built-in crop does not.

  6. londonhogfan
    Member
    Posted 2 years ago #

    Having the same problem. Doesn't seem to resize or use the correct ratio when cropping custom thumbnail sizes.

Topic Closed

This topic has been closed to new replies.

About this Topic