SlideShare a Scribd company logo
1 of 46
Download to read offline
Dealing with media
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
Sometimes you need to make a change
WordPress 3.5 did that for media
WordPress 3.5
• New media manager
• Ability for multiple galleries
• Insert multiple images
• Rewrite of backend API
• Support for ImageMagick
Old media manager
New media manager
Drag and drop
Galleries
Edit the gallery
Demo - gallery
A lot of changes at once
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
How can we make it better?
Work together with the
WordPress UI team
Extend it with plugins
• Media tags (taxonomies)
• Faster image insert
• Multimedia box
• Media folders (dev)
Faster image insert
Multimedia box
Media folders
Features
• Ability to put media into
folders
• Show folders on media
page
• Drag & Drop support
Still missing
• Better way to change
the folder name
• Media dialog tab
• Gallery folder support
• Upload straight into a
folder
Demo - Media folders
How	 to
// 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();
// If the media frame already exists, reopen it.
if ( image_frame ) {
image_frame.open();
}
Magic function when loading all WordPress related code
wp_enqueue_media()
So we talked about
media in general
Dealing with images
Dealing with images
• Having multiple image sizes
• Making changes
• But you can have issues like:
• Weird color differences
• Missing information in sizes
Using add_image_size ()
$awesome = new
WP_Image_Editor
$image = wp_get_image_editor( 'cool_image.jpg' );
if ( ! is_wp_error( $image ) ) {
$image->rotate( 90 );
$image->resize( 300, 300, true );
$image->save( 'new_image.jpg' );
}
Midden crop
$editor->resize( 300, 300, true );
Links boven
$editor->crop( 0, 0, 300, 300,
300, 300, false );
Midden crop met
rotatie en flip
$editor->flip( false, true );
$editor->rotate( 30 );
$editor->crop( (1589-(960*0.7))/2,
(1472-(1280*0.7))/2, 960*0.7,
1280*0.7, 300, 300, false );
More examples
Using this code in your own plugin
Look at what WPThumb has done
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.
WP_Image
• https://github.com/markoheijnen/WP_Image
• WP_Image_Editor layer for attachments
• add_image_size()
• store_image()
• get_editor()
• get_meta_data()
As mentioned not just a big
refactoring of the codebase
ImageMagick &
GraphicMagick support
The improvement photographers will like
The difference
Plugins
• https://github.com/markoheijnen/Improved-
GD-Image-Editor
• https://github.com/interconnectit/my-eyes-
are-up-here
• https://github.com/markoheijnen/gmagick-
editor
• https://github.com/getsource/imagick-sepia
Image editor
The one thing that didn’t got changed in 3.5
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
Demo - My editor playground
Dealing with video/audio
Dealing with Video/Audio
• Core support in 3.6
• MediaElement.js
• [video width="600" height="480"
mp4="source.mp4" ogv="source.ogv"
webm="source.webm"]
• http://my.mp3s.com/cool/songs/coolest.mp3
Thanks for listening!
Any questions?
• markoheijnen.com
• @markoheijnen
• nl.linkedin.com/in/markoheijnen

More Related Content

What's hot

Word press sites maintenanace
Word press sites maintenanaceWord press sites maintenanace
Word press sites maintenanace
Michelle Castillo
 
Improving Site Performace Using Css Sprite
Improving Site Performace Using Css SpriteImproving Site Performace Using Css Sprite
Improving Site Performace Using Css Sprite
Shyamala Prayaga
 

What's hot (14)

The Child Theme Dilemma (EN)
The Child Theme Dilemma (EN)The Child Theme Dilemma (EN)
The Child Theme Dilemma (EN)
 
Word press sites maintenanace
Word press sites maintenanaceWord press sites maintenanace
Word press sites maintenanace
 
WordPress Insider Meetup Group - Jan, 7, 2016 meeting
WordPress Insider Meetup Group - Jan, 7,  2016 meetingWordPress Insider Meetup Group - Jan, 7,  2016 meeting
WordPress Insider Meetup Group - Jan, 7, 2016 meeting
 
Improving Site Performace Using Css Sprite
Improving Site Performace Using Css SpriteImproving Site Performace Using Css Sprite
Improving Site Performace Using Css Sprite
 
Introduction to WordPress Security
Introduction to WordPress SecurityIntroduction to WordPress Security
Introduction to WordPress Security
 
Front-End Performance Optimization in WordPress
Front-End Performance Optimization in WordPressFront-End Performance Optimization in WordPress
Front-End Performance Optimization in WordPress
 
Squeeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla WebsiteSqueeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla Website
 
Speed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate PerformanceSpeed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate Performance
 
How to Speed Up Your Joomla Website
How to Speed Up Your Joomla WebsiteHow to Speed Up Your Joomla Website
How to Speed Up Your Joomla Website
 
Html5
Html5Html5
Html5
 
Php cookies
Php cookiesPhp cookies
Php cookies
 
8 Easy Ways to Speed up Your Wordpress Site
8 Easy Ways to Speed up Your Wordpress Site8 Easy Ways to Speed up Your Wordpress Site
8 Easy Ways to Speed up Your Wordpress Site
 
Html5 + css3+ java script for future - HTML5
Html5 + css3+ java script for future - HTML5Html5 + css3+ java script for future - HTML5
Html5 + css3+ java script for future - HTML5
 
Optimizing Your WordPress Site: Why speed matters, and how to get there
Optimizing Your WordPress Site: Why speed matters, and how to get thereOptimizing Your WordPress Site: Why speed matters, and how to get there
Optimizing Your WordPress Site: Why speed matters, and how to get there
 

Similar to Dealing with media

WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1
Yoav Farhi
 
Theming moodle technical
Theming moodle   technicalTheming moodle   technical
Theming moodle technical
Alex Walker
 
Unit e adobe dreamweaver cs6
Unit e adobe dreamweaver cs6Unit e adobe dreamweaver cs6
Unit e adobe dreamweaver cs6
Krista Lawrence
 

Similar to Dealing with media (20)

The awesome things you can do with images inside WordPress
The awesome things you can do with images inside WordPressThe awesome things you can do with images inside WordPress
The awesome things you can do with images inside WordPress
 
Image manipulation in WordPress 3.5
Image manipulation in WordPress 3.5Image manipulation in WordPress 3.5
Image manipulation in WordPress 3.5
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1
 
Word press gets responsive 4x3
Word press gets responsive 4x3Word press gets responsive 4x3
Word press gets responsive 4x3
 
Perfect your images using WordPress - WordCamp Europe 2013
Perfect your images using WordPress - WordCamp Europe 2013Perfect your images using WordPress - WordCamp Europe 2013
Perfect your images using WordPress - WordCamp Europe 2013
 
WordCamp Praga 2015
WordCamp Praga 2015WordCamp Praga 2015
WordCamp Praga 2015
 
Intro to WordPress Child Themes (NERDS Sept 2014)
Intro to WordPress Child Themes (NERDS Sept 2014)Intro to WordPress Child Themes (NERDS Sept 2014)
Intro to WordPress Child Themes (NERDS Sept 2014)
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress Themes
 
Bootstrap: the full overview
Bootstrap: the full overviewBootstrap: the full overview
Bootstrap: the full overview
 
WordPress and Images: How to Manage and Use Images Better
WordPress and Images: How to Manage and Use Images BetterWordPress and Images: How to Manage and Use Images Better
WordPress and Images: How to Manage and Use Images Better
 
Seven deadly theming sins
Seven deadly theming sinsSeven deadly theming sins
Seven deadly theming sins
 
WordPress 3.4 Theme Customizer
WordPress 3.4 Theme CustomizerWordPress 3.4 Theme Customizer
WordPress 3.4 Theme Customizer
 
Wordpress beyond blogging
Wordpress beyond bloggingWordpress beyond blogging
Wordpress beyond blogging
 
Theming moodle technical
Theming moodle   technicalTheming moodle   technical
Theming moodle technical
 
Unit e adobe dreamweaver cs6
Unit e adobe dreamweaver cs6Unit e adobe dreamweaver cs6
Unit e adobe dreamweaver cs6
 
Css web gallery
Css web galleryCss web gallery
Css web gallery
 
Efficient theming in Drupal
Efficient theming in DrupalEfficient theming in Drupal
Efficient theming in Drupal
 
Vanjs backbone-powerpoint
Vanjs backbone-powerpointVanjs backbone-powerpoint
Vanjs backbone-powerpoint
 
Agile Wordpress
Agile WordpressAgile Wordpress
Agile Wordpress
 
C# .NET Media Manager
C# .NET Media ManagerC# .NET Media Manager
C# .NET Media Manager
 

More from Marko Heijnen

Bootstrapping your plugin
Bootstrapping your pluginBootstrapping your plugin
Bootstrapping your plugin
Marko Heijnen
 

More from Marko Heijnen (20)

Custom coded projects
Custom coded projectsCustom coded projects
Custom coded projects
 
Security, more important than ever!
Security, more important than ever!Security, more important than ever!
Security, more important than ever!
 
My Contributor Story
My Contributor StoryMy Contributor Story
My Contributor Story
 
WooCommerce & Apple TV
WooCommerce & Apple TVWooCommerce & Apple TV
WooCommerce & Apple TV
 
The moment my site got hacked - WordCamp Sofia
The moment my site got hacked - WordCamp SofiaThe moment my site got hacked - WordCamp Sofia
The moment my site got hacked - WordCamp Sofia
 
Mijn site beveiliging
Mijn site beveiligingMijn site beveiliging
Mijn site beveiliging
 
The moment my site got hacked
The moment my site got hackedThe moment my site got hacked
The moment my site got hacked
 
My complicated WordPress site
My complicated WordPress siteMy complicated WordPress site
My complicated WordPress site
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescue
 
Protecting your site by detection
Protecting your site by detectionProtecting your site by detection
Protecting your site by detection
 
GlotPress aka translate.wordpress.org
GlotPress aka translate.wordpress.orgGlotPress aka translate.wordpress.org
GlotPress aka translate.wordpress.org
 
Writing clean and maintainable code
Writing clean and maintainable codeWriting clean and maintainable code
Writing clean and maintainable code
 
Extending WordPress as a pro
Extending WordPress as a proExtending WordPress as a pro
Extending WordPress as a pro
 
Let's create a multilingual site in WordPress
Let's create a multilingual site in WordPressLet's create a multilingual site in WordPress
Let's create a multilingual site in WordPress
 
Bootstrapping your plugin
Bootstrapping your pluginBootstrapping your plugin
Bootstrapping your plugin
 
The development and future of GlotPress
The development and future of GlotPressThe development and future of GlotPress
The development and future of GlotPress
 
Why Javascript matters
Why Javascript mattersWhy Javascript matters
Why Javascript matters
 
The code history of WordPress
The code history of WordPressThe code history of WordPress
The code history of WordPress
 
Building plugins like a pro
Building plugins like a proBuilding plugins like a pro
Building plugins like a pro
 
De nieuwe media flow in WordPress en hoe verder
De nieuwe media flow in WordPress en hoe verderDe nieuwe media flow in WordPress en hoe verder
De nieuwe media flow in WordPress en hoe verder
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

Dealing with media