WordPress.org

Ready to get started?Download WordPress

Forums

Additional image sizes (zui)
Attachment meta data (3 posts)

  1. scottconnerly
    Member
    Posted 2 years ago #

    When creating new sizes of a file, please update the attachment meta data (see wp_get_attachment_metadata( )).

    Otherwise, great to find this plugin. I was still on the original and was getting tired of the errors. Thanks for picking up where the other guy left off!!

    http://wordpress.org/extend/plugins/additional-image-sizes-zui/

  2. scottconnerly
    Member
    Posted 2 years ago #

    After further investigation, it seems you are updating the metadata. My apologies.

    My particular situation comes when a particular uploaded image just barely meets the image size requirements. Case in point:
    I define a size "My_Img_Size" and give it a width and height of 600px each. I then upload a 600x400 image. The plugin does not generate an image (copy) that is that size. Because the width of 600 matches one of the defined max's, it just assumes 'full' is good enough.

    As it is, to make do, I have to first run image_get_intermediate_size(), and if it doesn't find the right sized image (the full size), I then must run image_downsize(). If you created the custom size that happened to match full size, I could just run wp_get_attachment_metadata() and go home early.

    $0.02

  3. Nanhe Kumar
    Member
    Posted 1 year ago #

    i am facing problem
    Cannot use string offset as an array in wp-content/plugins/additional-image-sizes-zui/vendor/beingzoe/zui_php/ZUI/WpAdditionalImageSizes.php on line 883

    what is problem if change code in line like this
    if(is_array($path_parts) && is_array($metadata)){
    $delete_wp_file = $path_parts['dirname'] . "/" . $metadata['sizes'][$size]['file'];
    }
    error gone but image is not creating all sizes

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic