Incorrect Sizes Displayed
-
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
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Incorrect Sizes Displayed’ is closed to new replies.