Best image hosting service

Its not recommended often enough, but Flickr is an excellent image host for blogs as well. Their pro account costs only $25/year. You get unlimited image, video uploads and no bandwidth limit. If you don’t want your blog image uploads populating your personal photostream, you can easily create a separate account for it. You can … Read more

Image dimensions same as image size

No, it won’t create a new image that is exactly the same size.. nor should it. All the thumbnail, medium, and large images are resized images, by definition. Since the original image is already 600×600, there’s no point in creating another file at the same size, but with a lower quality (remember that JPEG compression … Read more

Trigger JS when featured image upload window is opened in admin

After some digging I discovered that wp.media.featuredImage.frame() was what I was looking for: wp.media.featuredImage.frame().on(‘open’,function() { // Clever JS here }); I then discovered that the select event fires once you’ve clicked on the ‘Set featured image’ button, not when you’ve clicked on thumbnail, which was what I was after. So I bound my events to … Read more

Rename “Add Media” Button To “Add Images”

The button text being a translatable string, you can make use of the gettext filter: function wpse95025_rename_media_button( $translation, $text ) { if( is_admin() && ‘Add Media’ === $text ) { return ‘Add Images’; } return $translation; } add_filter( ‘gettext’, wpse95025_rename_media_button, 10, 2 ); For the sake of completeness: Of course, you can also keep the … Read more

Hook for image edit popup

The answer is there is no damn hook for the edit button. It’s just a bunch of JS contained within wp-includes/js/tinymce/plugins/wpeditimage/plugin.js. I’ve included the barebones of what you need below. Key points: a. Clicking an element with a data-wp-imgselect attribute will open the image edit dialogue. You need to change that to something else if … Read more