mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-05 04:11:18 +02:00
This changeset adds the capability for core media uploads to generate sub sized images in more than a single mime type. The output formats for each mime type can be controlled through a filter. WebP is used as an additional output format for JPEG images by default to improve front end performance. When generating additional mime types, only images which are smaller than the respective original are retained. By default, additional mime type images are only generated for the built-in core image sizes and any custom sizes that have opted in. Image meta is updated with a new 'sources' array containing file details for each mime type. Each image size in the 'sizes' array also gets a new 'sources' array that contains the image file details for each mime type. This change also increases image upload retries to accommodate additional image sizes. It also adds a `$mime_type` parameter to the `wp_get_missing_image_subsizes` function and filter. This change adds three new filters to enable full control of secondary mime image generation and output: * A new filter `wp_image_sizes_with_additional_mime_type_support` that filters the sizes that support secondary mime type output. Developers can use this to control the output of additional mime type sub-sized images on a per size basis. * A new filter `wp_upload_image_mime_transforms` that filters the output mime types for a given input mime type. Developers can use this to control generation of additional mime types for a given input mime type or even override the original mime type. * A new filter `wp_content_image_mimes` which controls image mime type output selection and order for frontend content. Developers can use this to control the mime type output preference order for content images. Content images inserted from the media library will use the available image versions based on the order from this filter. Thanks to the many contributors who helped develop, test and give feedback on this feature. A haiku to summarize: Upload a JPEG Images of all sizes Output as WebPs Props flixos90, MatthiasReinholz, studiolxv, markhowellsmead, eatingrules, pbiron, mukesh27, joegrainger, mehulkaklotar, tweetythierry, akshitsethi, peterwilsoncc, eugenemanuilov, mitogh, shetheliving, clarkeemily, codekraft, mikeschroder, clorith, kasparsd, spacedmonkey, trevorpfromsandee, jb510, scofennellgmailcom, seedsca, cagsmith, karinclimber, dainemawer, baxbridge, grapplerulrich, sobatkras, chynnabenton, tonylocalword, barneydavey, kwillmorth, garymatthews919, olliejones, imarkinteractive, jeffpaul, feastdesignco, webbeetle, masteradhoc. See #55443. Built from https://develop.svn.wordpress.org/trunk@53751 git-svn-id: http://core.svn.wordpress.org/trunk@53310 1a063a9b-81f0-0310-95a4-ce76da25c4cd |
||
---|---|---|
.. | ||
codemirror | ||
crop | ||
dist | ||
imgareaselect | ||
jcrop | ||
jquery | ||
mediaelement | ||
plupload | ||
swfupload | ||
thickbox | ||
tinymce | ||
admin-bar.js | ||
admin-bar.min.js | ||
api-request.js | ||
api-request.min.js | ||
autosave.js | ||
autosave.min.js | ||
backbone.js | ||
backbone.min.js | ||
clipboard.js | ||
clipboard.min.js | ||
colorpicker.js | ||
colorpicker.min.js | ||
comment-reply.js | ||
comment-reply.min.js | ||
customize-base.js | ||
customize-base.min.js | ||
customize-loader.js | ||
customize-loader.min.js | ||
customize-models.js | ||
customize-models.min.js | ||
customize-preview-nav-menus.js | ||
customize-preview-nav-menus.min.js | ||
customize-preview-widgets.js | ||
customize-preview-widgets.min.js | ||
customize-preview.js | ||
customize-preview.min.js | ||
customize-selective-refresh.js | ||
customize-selective-refresh.min.js | ||
customize-views.js | ||
customize-views.min.js | ||
heartbeat.js | ||
heartbeat.min.js | ||
hoverintent-js.min.js | ||
hoverIntent.js | ||
hoverIntent.min.js | ||
imagesloaded.min.js | ||
json2.js | ||
json2.min.js | ||
masonry.min.js | ||
mce-view.js | ||
mce-view.min.js | ||
media-audiovideo.js | ||
media-audiovideo.min.js | ||
media-editor.js | ||
media-editor.min.js | ||
media-grid.js | ||
media-grid.min.js | ||
media-models.js | ||
media-models.min.js | ||
media-views.js | ||
media-views.min.js | ||
quicktags.js | ||
quicktags.min.js | ||
shortcode.js | ||
shortcode.min.js | ||
swfobject.js | ||
tw-sack.js | ||
tw-sack.min.js | ||
twemoji.js | ||
twemoji.min.js | ||
underscore.js | ||
underscore.min.js | ||
utils.js | ||
utils.min.js | ||
wp-ajax-response.js | ||
wp-ajax-response.min.js | ||
wp-api.js | ||
wp-api.min.js | ||
wp-auth-check.js | ||
wp-auth-check.min.js | ||
wp-backbone.js | ||
wp-backbone.min.js | ||
wp-custom-header.js | ||
wp-custom-header.min.js | ||
wp-embed-template.js | ||
wp-embed-template.min.js | ||
wp-embed.js | ||
wp-embed.min.js | ||
wp-emoji-loader.js | ||
wp-emoji-loader.min.js | ||
wp-emoji-release.min.js | ||
wp-emoji.js | ||
wp-emoji.min.js | ||
wp-list-revisions.js | ||
wp-list-revisions.min.js | ||
wp-lists.js | ||
wp-lists.min.js | ||
wp-pointer.js | ||
wp-pointer.min.js | ||
wp-sanitize.js | ||
wp-sanitize.min.js | ||
wp-util.js | ||
wp-util.min.js | ||
wpdialog.js | ||
wpdialog.min.js | ||
wplink.js | ||
wplink.min.js | ||
zxcvbn-async.js | ||
zxcvbn-async.min.js | ||
zxcvbn.min.js |