Support » Plugin: Show Dimensions in Library » Incorrect Sizes Displayed

  • Resolved Ben Huson

    (@husobj)


    I gave you a 4 star rating as it’s a really useful plugin. Thank you.

    On testing I have found in one weird circumstance where the file sizes are not always correct.

    If for some reason a person has added an image size call ‘full’ – which they shouldn’t but it could happen – then the specified ‘full’ size will be displayed rather than the original uploaded fize size.

    add_image_size( 'full', 1400, 1400, false );

    To avoid this it might be better to get the uploaded file size from the image meta data like this:

    $metadata = wp_get_attachment_metadata( $post_id );
    $width = $metadata['width'];
    $height = $metadata['height'];

    Thanks for a really useful plugin

    Ben

    https://wordpress.org/plugins/show-dimensions-in-library/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author DoubelJ

    (@doubelj)

    I have changed the function. And tested it. I hope it works for you.
    The column is also sortable now.

    Thanks, the size issue is resolved.

    Ordering not quite working as expected – I’ll post a separate issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Incorrect Sizes Displayed’ is closed to new replies.