Comments on: WordPress – List all image sizes in Media Uploader http://www.studiograsshopper.ch/code-snippets/wordpress-list-all-image-sizes-in-media-uploader/ Sun, 22 Mar 2015 14:44:25 +0000 hourly 1 http://wordpress.org/?v=4.1.1 By: Ade http://www.studiograsshopper.ch/code-snippets/wordpress-list-all-image-sizes-in-media-uploader/#comment-239160 Thu, 19 Dec 2013 18:35:26 +0000 http://www.studiograsshopper.ch/?p=3031#comment-239160 And the difference bewteen the plugin and this code is what, exactly? Nothing. Choose whatever route you prefer. :-)

]]>
By: Ade http://www.studiograsshopper.ch/code-snippets/wordpress-list-all-image-sizes-in-media-uploader/#comment-239158 Thu, 19 Dec 2013 18:31:57 +0000 http://www.studiograsshopper.ch/?p=3031#comment-239158 It could be that your theme is setting the global $content_width variable (take a peek at functions.php to see if this is the case). If so, this variable overrides the theoretical dimensions set in your add_image_size() and limits the generated image width to whatever the value of $content_width is. The idea of $content_width is to ensure that an uploaded image will never break-out of the content area it is displayed in on the front end.
Personally, I think $content_width is a pain – especially if one has gone to the trouble of defining custom image sizes and, presumably, is therefore capable of ensuring that image sizes are appropriate.
Fix?
Either re-define $content_width by finding where its value is set in functions.php and changing it, or use something more sophisticated like this.

]]>
By: David http://www.studiograsshopper.ch/code-snippets/wordpress-list-all-image-sizes-in-media-uploader/#comment-239069 Mon, 09 Dec 2013 08:35:54 +0000 http://www.studiograsshopper.ch/?p=3031#comment-239069 Works for me in 3.7.1 no problems except one slightly odd bug. When it lists the sizes of the images they are wrong. The list of names is right, but the sizes themselves are wrong in the dropdown.

For example I have a size called ‘fullwidth’ with a dimension of 940 wide and auto height. But when I see the size in the Media Manager for ‘fullwidth’ it says 680 x 520. When I add the image into the post the filename shows the right file is being called but the width and height attributes are set to 680 x 520.

Any idea what could be causing this?

]]>
By: George http://www.studiograsshopper.ch/code-snippets/wordpress-list-all-image-sizes-in-media-uploader/#comment-239058 Sat, 07 Dec 2013 19:36:34 +0000 http://www.studiograsshopper.ch/?p=3031#comment-239058 There is a plugin that does that:

There is a plugin that does that:

]]>
By: Ade http://www.studiograsshopper.ch/code-snippets/wordpress-list-all-image-sizes-in-media-uploader/#comment-238883 Mon, 28 Oct 2013 18:31:11 +0000 http://www.studiograsshopper.ch/?p=3031#comment-238883 You’re welcome! Glad it was useful. :-)

]]>
By: Ade http://www.studiograsshopper.ch/code-snippets/wordpress-list-all-image-sizes-in-media-uploader/#comment-238882 Mon, 28 Oct 2013 18:30:39 +0000 http://www.studiograsshopper.ch/?p=3031#comment-238882 Works fine for me. Telling me it doesn’t work is of no use – give me some details!

]]>
By: thalis http://www.studiograsshopper.ch/code-snippets/wordpress-list-all-image-sizes-in-media-uploader/#comment-238814 Fri, 27 Sep 2013 19:46:07 +0000 http://www.studiograsshopper.ch/?p=3031#comment-238814 it stoped to work with wordpress 3.6+

]]>
By: Gil Namur http://www.studiograsshopper.ch/code-snippets/wordpress-list-all-image-sizes-in-media-uploader/#comment-238725 Sun, 08 Sep 2013 00:34:49 +0000 http://www.studiograsshopper.ch/?p=3031#comment-238725 Ade!

What a great and very useful piece of code this is.
THANK YOU!
Cheers,
Gil

]]>
By: Ade http://www.studiograsshopper.ch/code-snippets/wordpress-list-all-image-sizes-in-media-uploader/#comment-237586 Sat, 20 Apr 2013 22:15:41 +0000 http://www.studiograsshopper.ch/?p=3031#comment-237586 Hi,

The add_image_size code can go anywhere in functions.php.
Note that the screenshots in my article are pre-WP 3.5 and that the list of image sizes is now a dropdown box, not a list of radio buttons, in WP 3.5.
Also, bear in mind that if your theme sets $content_width, any image size larger than the value of $content_width will not appear in the media uploader.
PS: When I get time I’ll update this article to reflect the WP 3.5 UI changes.

]]>
By: Jacob http://www.studiograsshopper.ch/code-snippets/wordpress-list-all-image-sizes-in-media-uploader/#comment-237581 Sat, 20 Apr 2013 15:37:20 +0000 http://www.studiograsshopper.ch/?p=3031#comment-237581 Hello,
After uploading you intial code, I have not been able to get any additional image sizes to show up in add media. In the edit media thumbnail Settings box I only have options:
– All image sizes
– Thumbnail
– All sizes except thumbnail
With older methods you would ahve to define the name to show in WP add media, is this still needed and where does it go in relation to your code?

'new-thumb' => 'New Thumb',

Also I don’t see where to apply the custom image code?

add_image_size( new-thumb', 600, 400, true );

in functions.php?

Thanks for your help in advance :)

]]>