This document discusses changes to media handling in WordPress 3.5, including a new media manager, ability for multiple galleries, drag and drop functionality, and backend API rewrite. It notes some issues with the new system and proposes extensions like media tags, faster image insertion, and media folders. It also covers using the WP_Image_Editor class to programmatically edit images and plugins that improve image handling.
2. Me
• WordPress core contributor
• GlotPress core developer
• Recent rockstar of 3.4
• Co author of WP_Image_Editor
• Working a lot with media
• Hacking plugins together
13. Complains
• Opening media dialog shows library instead of
upload screen
• Adding a featured image is more convoluted
• Inputting meta data has become more difficult
• Gallery sorting for the shortcode dissappeared
• General response of not working due to plugins
breaking stuff
24. // Create the media frame.
image_frame = wp.media.frames.formatImage = wp.media({
// Set the title of the modal.
title: $el.data('choose'),
// Tell the modal to show only images.
library: {
type: 'image'
},
// Customize the submit button.
button: {
// Set the text of the button.
text: $el.data('update')
}
});
image_frame.open();
25. // If the media frame already exists, reopen it.
if ( image_frame ) {
image_frame.open();
}
29. Dealing with images
• Having multiple image sizes
• Making changes
• But you can have issues like:
• Weird color differences
• Missing information in sizes
34. Using this code in your own plugin
Look at what WPThumb has done
35. WP_Thumb
• https://github.com/humanmade/WPThumb
• On demand image resizing for WordPress
• Automatic images resizing, cropping and
caching.
• Ideal for when you want to change the
dimensions of default image sizes.
42. A better image editor
• A popup to change an image
• No more opening a new venster from the new image
dialog
• Better ways to say on which image size it should apply
• The image editor should be extendable
• Be able to use image filters for example. No Instagram
anymore but just WordPress for all your images