Title: images | Make WordPress Core

---

#  Tag Archives: images

 [  ](https://profiles.wordpress.org/adamsilverstein/) [Adam Silverstein](https://profiles.wordpress.org/adamsilverstein/)
6:54 pm _on_ February 23, 2024     
Tags: [6-5 ( 76 )](https://make.wordpress.org/core/tag/6-5/),
[core-images ( 9 )](https://make.wordpress.org/core/tag/core-images/), [dev-notes ( 652 )](https://make.wordpress.org/core/tag/dev-notes/),
[dev-notes-6.5 ( 15 )](https://make.wordpress.org/core/tag/dev-notes-6-5/), images

# 󠀁[WordPress 6.5 adds AVIF support ](https://make.wordpress.org/core/2024/02/23/wordpress-6-5-adds-avif-support/)󠁿

WordPress 6.5 supports AVIF, a modern image format that offers significant improvements
in image quality and compression over previous formats like JPEG, PNG, and even 
WebP.  AVIF images can be up to 50% smaller than JPEGs while maintaining the same
image quality. AVIF images also support a wide range of colors (including HDR) and
produce sharper images than JPEGs, especially in areas with high detail.

From WordPress version 6.5 forward, you can upload and use AVIF images in WordPress
just like you would a JPEG or PNG image today – as long as your hosting environment
supports AVIF. Switching to the AVIF format for your images is likely to improve
your site’s performance and your site visitor’s experience. 

## How AVIF helps you

AVIF images are significantly smaller than their JPEG equivalents, so pages load
more quickly and take less bandwidth to transmit. AVIF images still get all of the
benefits of the responsive images, Fetch Priority, and lazy loading that WordPress
supports by default. Finally, AVIFs are [supported](https://caniuse.com/avif) in
all major browsers, so most sites can start using them today.

## Creating AVIF images

Many image editing tools support exporting to AVIF. You can also use command line
conversion tools or web based open sourceOpen Source Open Source denotes software
for which the original source code is made freely available and may be redistributed
and modified. Open Source **must be** delivered via a licensing model, see GPL. 
tools like [Squoosh](https://squoosh.app/). Once you save your images as AVIF, upload
them to WordPress and use them like you would any other image. WordPress can also
create AVIFs for you automatically, for more details, see the FAQ item below.

## Using AVIF images in WordPress

AVIF images work like any other image format in WordPress, with a few important 
notes:

AVIF in WordPress depends on support in your web server’s image processing library(
WordPress has built-in support for both _Imagick_ and _LibGD _for image processing).
You can check for AVIF support in wp-adminadmin (and super admin) by visiting Tools-
> Site Health, clicking the “Info” tab and expanding the “Media Handling” section,
then finally looking for “AVIF” in the list of supported formats.

If your audience includes a significant number of users on an unsupported browser,
either avoid using AVIF images, or enqueue a browser [polyfill](https://github.com/Kagami/avif.js).

## FAQ

**Q: How do I adjust the compression level used for generated AVIF images?**

The `wp_editor_set_quality` filterFilter Filters are one of the two types of Hooks
[https://codex.wordpress.org/Plugin_API/Hooks](https://codex.wordpress.org/Plugin_API/Hooks).
They provide a way for functions to modify data of other functions. They are the
counterpart to Actions. Unlike Actions, filters are meant to work in an isolated
manner, and should never have side effects such as affecting global variables and
output. can be used to set the quality setting. The passed mime type enables setting
by type, for example:

    ```wp-block-code
    // Use a quality setting of 75 for AVIF images.function filter_avif_quality( $quality, $mime_type ) {	if ( 'image/avif' === $mime_type ) {		return 75;	}	return $quality;}add_filter( 'wp_editor_set_quality', 'filter_avif_quality', 10, 2 );
    ```

**How can I output lossless AVIF images?**

Using a compression level of 100 will set AVIF to its lossless mode.

**Q: Can WordPress create AVIF images when I upload JPEGs?**

Yes. Developers can use the `image_editor_output_format` filter to specify this 
type of transformation for uploads. Here is an example:

    ```wp-block-code
    // Output AVIFs for uploaded JPEGsfunction filter_image_editor_output_format( $formats ) {	$formats['image/jpeg'] = 'image/avif';	return $formats;}add_filter( 'image_editor_output_format', 'filter_image_editor_output_format' );
    ```

**Q: Can WordPress create AVIF images when I upload HEIC images?**

Yes. Developers can use the `image_editor_output_format` filter to specify this 
type of transformation for uploads. Here is an example:

    ```wp-block-code
    // Output AVIFs for uploaded HEICs
    function filter_image_editor_output_format( $formats ) {
    	$formats['image/heic'] = 'image/avif';
    	return $formats;
    }
    add_filter( 'image_editor_output_format', 'filter_image_editor_output_format' );
    ```

**Q: If I use WordPress multisitemultisite Used to describe a WordPress installation
with a network of multiple blogs, grouped by sites. This installation type has shared
users tables, and creates separate database tables for each blog (wp_posts becomes
wp_0_posts). See also network, blog, site, will all my sites work with AVIF images?**

No. Multisite stores the file types that users are allowed to upload when a site
is created. We are still working on improving this in [#53167](https://core.trac.wordpress.org/ticket/53167).
In the meantime, to ensure all existing sites on a networknetwork (versus site, 
blog) allow AVIF files, you can use the `site_option` filter in a network mu-pluginPlugin
A plugin is a piece of software containing a group of functions that can be added
to a WordPress website. They can extend functionality or add new features to your
WordPress websites. WordPress plugins are written in the PHP programming language
and integrate seamlessly with WordPress. These can be free in the WordPress.org 
Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
or can be cost-based plugin from a third-party. to add avif to the allowed file 
types for all network sites:

    ```wp-block-code
    // Ensure all network sites include AVIF support.function filter_site_option_upload_filetypes( $filetypes ) {	$filetypes = explode( ' ', $filetypes );	if ( ! in_array( 'avif', $filetypes, true ) ) {		$filetypes[] = 'avif';	}	return implode( ' ', $filetypes );}add_filter( 'site_option_upload_filetypes', 'filter_site_option_upload_filetypes' );
    ```

---

Thanks to [@stevenlinx](https://profiles.wordpress.org/stevenlinx/) and [@westonruter](https://profiles.wordpress.org/westonruter/)
for reviewing this post.

[#6-5](https://make.wordpress.org/core/tag/6-5/), [#core-images](https://make.wordpress.org/core/tag/core-images/),
[#dev-notes](https://make.wordpress.org/core/tag/dev-notes/), [#dev-notes-6-5](https://make.wordpress.org/core/tag/dev-notes-6-5/),
[#images](https://make.wordpress.org/core/tag/images/)

 [  ](https://profiles.wordpress.org/flixos90/) [Felix Arntz](https://profiles.wordpress.org/flixos90/)
2:35 pm _on_ May 2, 2023     
Tags: fetchpriority, images, [media ( 93 )](https://make.wordpress.org/core/tag/media/),
[performance ( 420 )](https://make.wordpress.org/core/tag/performance/), [performance-lab ( 6 )](https://make.wordpress.org/core/tag/performance-lab/)

# 󠀁[Proposal for enhancing LCP image performance with the fetchpriority attribute in WordPress core](https://make.wordpress.org/core/2023/05/02/proposal-for-enhancing-lcp-image-performance-with-fetchpriority/)󠁿

This post proposes adding the `fetchpriority=”high”` attribute to [LCP](https://web.dev/lcp/)
images in WordPress coreCore Core is the set of software required to run WordPress.
The Core Development Team builds WordPress. to enhance LCP performance. The proposal
was created as a collaboration between members of the Core Performance Team.

## **Context**

The `fetchpriority` attribute is a [standard HTML attribute](https://html.spec.whatwg.org/multipage/urls-and-fetching.html#fetch-priority-attributes)
that can be used to indicate to the browser that a given resource should have a 
particular priority for when it should be considered for loading. Most commonly,
using the attribute is recommended with a value of “high”, only on the most important
image on a page.

It is a performance best practice to provide `fetchpriority=”high”` on the single
image that is the “Largest Contentful Paint element” in the HTMLHTML HyperText Markup
Language. The semantic scripting language primarily used for outputting content 
in web browsers. markup, to indicate to the browser that this image should be prioritized
over other resources that would compete with it for networknetwork (versus site,
blog) bandwidth.

> [Largest Contentful Paint (LCP)](https://web.dev/lcp/) is one of the three [Core Web Vitals](https://web.dev/vitals/#core-web-vitals)
> metrics, and it represents how quickly the main content of a web page is loaded.
> Specifically, LCP measures the time from when the user initiates loading the page
> until the largest image or text blockBlock Block is the abstract term used to 
> describe units of markup that, composed together, form the content or layout of
> a webpage using the WordPress editor. The idea combines concepts of what in the
> past may have achieved with shortcodes, custom HTML, and embed discovery into 
> a single consistent API and user experience. is rendered within the viewport.
>  Quoted from [this article about optimizing LCP](https://web.dev/optimize-lcp/)

As mentioned above, the Largest Contentful Paint element can take different forms,
it may be an image, text, video, or other resource. However, most commonly the LCP
element on WordPress sites is an image, concretely 42.4% on desktop and 38.2% on
mobile based on [HTTP Archive data from February 2023](https://github.com/GoogleChromeLabs/wpp-research/pull/49).
Of those sites, less than 0.03% have `fetchpriority=”high”` on their LCP image, 
so it is safe to say that introducing support in WordPress core will benefit almost
all of them.

You can learn more about the `fetchpriority` attribute and how it should be used
to optimize image performance in [this article](https://web.dev/priority-hints/#the-fetchpriority-attribute).

## **Proposed solution**

WordPress core already comes with a mechanism to detect which image(s) not to lazy-
load because they are likely in the viewport, which includes the potential LCP image.
Bringing `fetchpriority=”high”` to images in WordPress core should make use of that
existing logic for the `loading` attribute, which was [added in WordPress 5.9](https://make.wordpress.org/core/2021/12/29/enhanced-lazy-loading-performance-in-5-9/).
However, the two attributes should still function independently of each other. Furthermore,
a few additional aspects need to be taken into consideration and implemented as 
additional heuristics that only apply to the `fetchpriority` attribute, but not 
the `loading` attribute.

Initially, the two attributes may seem like they are opposites. An image that should
be lazy-loaded should not have a high priority, and vice-versa. The usage of `fetchpriority
=”high”` however needs to be a bit more nuanced: It should only be loaded on the
single most important image on the page. This is different from `loading=”lazy”`
which should be omitted on any image above the fold — which sometimes may be just
the LCP image, while in other cases it may be multiple images.

In other words, `fetchpriority=”high”` should only ever appear **on a single image**
at most.

### **Scope**

While the `fetchpriority` attribute is available on a few different HTML elements,
the scope of this proposal is only to use the attribute on images, specifically 
to add it to the likely LCP image of a page so that the browser knows to load it
earlier than other resources that may be competing with it.

### **Performance impact**

Based on benchmarks conducted by members of the Core Performance Team, adding `fetchpriority
=”high”` to the LCP image typically improves LCP performance by 5-10%, which is 
a notable win for adding a simple attribute to an image tagtag A directory in Subversion.
WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), 
the common convention of tags in version control systems. (Not to be confused with
post tags.). In some instances the enhancements can even be close to 30%, like in
an [example from the aforementioned article](https://web.dev/priority-hints/#increase-the-priority-of-the-lcp-image).

### **Browser compatibility**

While the `fetchpriority` attribute is a relatively new attribute first introduced
in 2022, it was [standardized in February 2023](https://github.com/whatwg/html/pull/8470)
and is supported by all Chromium based browsers, which make up for ~70% of browser
usage [based on ](https://caniuse.com/mdn-html_elements_img_fetchpriority)[caniuse.com](http://caniuse.com).
Support was [recently added in WebKit](https://bugs.webkit.org/show_bug.cgi?id=252739),
and is currently [available in the Safari 167 Tech Preview](https://developer.apple.com/documentation/safari-technology-preview-release-notes/stp-release-167#Web-API).
[Firefox has expressed positive feedback](https://mozilla.github.io/standards-positions/#priority-hints)
on the feature, and a [ticket](https://bugzilla.mozilla.org/show_bug.cgi?id=1797715)
to support it is available. Despite not every major browser supporting the attribute,
it is a progressive enhancementenhancement Enhancements are simple improvements 
to WordPress, such as the addition of a hook, a new feature, or an improvement to
an existing feature., i.e. fully backward compatible: A browser that does not understand
the attribute will ignore it, and its presence won’t cause any adverse effects.

Effectively, this enhancement is only about adding the `fetchpriority=”high”` attribute
to the LCP image, which does not pose any risk of breaking backward compatibility.

### **Default behavior and customization**

Similar to how WordPress core handles omitting the `loading` attribute on specific
images, it should add the `fetchpriority` attribute by default on the LCP image 
based on server-side heuristics. While the exact heuristics are still being defined,
it should be noted that the two attributes will never be used on the same image 
as they should be mutually exclusive.

Developers will be able to customize where the attribute should be used, e.g. when
using the functions [`wp_get_attachment_image()`](https://developer.wordpress.org/reference/functions/wp_get_attachment_image/)
and [`get_the_post_thumbnail()`](https://developer.wordpress.org/reference/functions/get_the_post_thumbnail/),
both of which should receive support for the attribute. The default addition of 
the attribute to in-content images will also be customizable using a new filterFilter
Filters are one of the two types of Hooks [https://codex.wordpress.org/Plugin_API/Hooks](https://codex.wordpress.org/Plugin_API/Hooks).
They provide a way for functions to modify data of other functions. They are the
counterpart to Actions. Unlike Actions, filters are meant to work in an isolated
manner, and should never have side effects such as affecting global variables and
output., which will likely be similar to existing image attribute filters like [`wp_img_tag_add_loading_attr`](https://developer.wordpress.org/reference/hooks/wp_img_tag_add_loading_attr/)
or [`wp_img_tag_add_width_and_height_attr`](https://developer.wordpress.org/reference/hooks/wp_img_tag_add_width_and_height_attr/).

## **Alternatives considered**

Alternatively to `fetchpriority=”high”`, images can also be prioritized through 
other means, e.g. a `link[rel=”preload”]` tag in the head, or a `Link` response 
headerHeader The header of your site is typically the first thing people will experience.
The masthead or header art located across the top of your page is part of the look
and feel of your website. It can influence a visitor’s opinion about your content
and you/ your organization’s brand. It may also look different on different screen
sizes.. While those two approaches in principle allow the browser to know about 
loading the image even earlier, in practice there isn’t a notable difference, especially
when using the tag, as at that point the entire HTML will already be loaded.

Either of the alternative approaches would furthermore require WordPress core knowing
about the image in the page load lifecycle before it is even included in the output,
which makes them more complex to implement in a way that is not justifiable given
the little benefits it would bring over using `fetchpriority=”high”` on the actual
image tag.

## **Contributing and testing this enhancement**

An early version of the proposed enhancement can already be tested through the [Performance Lab plugin](https://wordpress.org/plugins/performance-lab/),
by enabling its [Fetchpriority module](https://github.com/WordPress/performance/issues?q=is%3Aissue+label%3A%22%5BModule%5D+fetchpriority%22),
or alternatively through the [Fetchpriority standalone plugin](https://wordpress.org/plugins/fetchpriority/)
which uses the same underlying logic. It should be noted that the implementation
is still being refined with additional heuristics to detect the LCP image, and since
it is part of a pluginPlugin A plugin is a piece of software containing a group 
of functions that can be added to a WordPress website. They can extend functionality
or add new features to your WordPress websites. WordPress plugins are written in
the PHP programming language and integrate seamlessly with WordPress. These can 
be free in the WordPress.org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
or can be cost-based plugin from a third-party. rather than within WordPress core,
the customization options outlined above cannot be part of this early implementation.
It should furthermore be noted that the plugin implementation relies heavily on 
WordPress core’s lazy-loading heuristics, whereas the plan for the eventual core
implementation would be to decouple the two.

A WordPress Core TracTrac An open source project by Edgewall Software that serves
as a bug tracker and project management tool for WordPress. ticketticket Created
for both bug reports and feature development on the bug tracker. [#58235](https://core.trac.wordpress.org/ticket/58235)
has been opened, and a pull request for WordPress core, including the aforementioned
customization options will be worked on soon.
Your testing and feedback is much 
appreciated. Please share your ideas, questions and thoughts either in a comment
on this post, in the [plugin’s support forum](https://wordpress.org/support/plugin/performance-lab/)
on wordpress.orgWordPress.org The community site where WordPress code is created
and shared by the users. This is where you can download the source code for WordPress
core, plugins and themes as well as the central location for community conversations
and organization. [https://wordpress.org/](https://wordpress.org/), or on the [GitHub repository](https://github.com/WordPress/performance/issues).

_Props to [@tweetythierry](https://profiles.wordpress.org/tweetythierry/) [@adamsilverstein](https://profiles.wordpress.org/adamsilverstein/)
[@addyosmani](https://profiles.wordpress.org/addyosmani/) [@joemcgill](https://profiles.wordpress.org/joemcgill/)
[@thekt12](https://profiles.wordpress.org/thekt12/) for review and proofreading._

[#fetchpriority](https://make.wordpress.org/core/tag/fetchpriority/), [#images](https://make.wordpress.org/core/tag/images/),
[#media](https://make.wordpress.org/core/tag/media/), [#performance](https://make.wordpress.org/core/tag/performance/),
[#performance-lab](https://make.wordpress.org/core/tag/performance-lab/)

 [  ](https://profiles.wordpress.org/adamsilverstein/) [Adam Silverstein](https://profiles.wordpress.org/adamsilverstein/)
8:22 pm _on_ June 7, 2021     
Tags: [5.8 ( 99 )](https://make.wordpress.org/core/tag/5-8/),
[core-images ( 9 )](https://make.wordpress.org/core/tag/core-images/), [dev-notes ( 652 )](https://make.wordpress.org/core/tag/dev-notes/),
images   

# 󠀁[WordPress 5.8 adds WebP support](https://make.wordpress.org/core/2021/06/07/wordpress-5-8-adds-webp-support/)󠁿

[WebP](https://developers.google.com/speed/webp) is a modern image format that provides
improved lossless and lossy compression for images on the web. WebP images are around
30% smaller on average than their JPEG or PNG equivalents, resulting in sites that
are faster and use less bandwidth. WebP is supported in all modern browsers [according to caniuse](https://caniuse.com/webp).

From WordPress version 5.8 forward, you can upload and use WebP images in WordPress
like you would a JPEG or PNG image today (as long as your hosting service supports
WebP). Switching to the WebP format for your images will improve your site’s performance
and your site visitor’s experience. 

## How WebP Helps You

WebP images are significantly smaller than their JPEG equivalents, so visitors to
your site will see the complete page loaded more quickly. Smaller images take less
bandwidth to transmit, and your images still get all of the responsive benefits 
of `srcset` and lazy loading by default. Finally, WebP is supported in all major
browsers, so most sites can start using them today.

## Creating WebP images

Image editing tools support exporting in WebP, or you can also use command line 
[conversion tools](https://developers.google.com/speed/webp/docs/precompiled) or
web based tools like [Squoosh](https://squoosh.app). Once you save your images as
WebP, upload them to WordPress and use them like you would any other image. 

## Using WebP images

WebP images work like any other image in WordPress with some small caveats. 

WebP images support lossy and lossless compression, as well as an animated format
and support for transparent images. In WordPress, the _lossless WebP_ format is 
only supported when the hosting server uses Imagick (the PHPPHP The web scripting
language in which WordPress is primarily architected. WordPress requires PHP 7.4
or higher library) until LibGD [adds support](https://github.com/libgd/libgd/pull/698).
In addition, animated and alpha formats are not yet supported for resized images(
lossy images are created instead when you upload in these formats).

WebP support in the media library requires that your web server’s image processing
library (WordPress supports both Imagick and LibGD) supports the WebP format. Fortunately
these libraries have supported WebP for quite a while so support is widely available.
If your web server does not support WebP, you will see an error message when you
try to upload a WebP image.

If your audience includes a significant number of users on an unsupported browser(
IE11 for example), either avoid using WebP images, or  enqueue a [browser polyfill](https://github.com/chase-moskal/webp-hero).

## Plans for the future

The media component team is also exploring the option of having WordPress perform
the image format conversion on uploaded images – using WebP as the default output
format for sub-sized images. You can track progress and test this feature on the
[trac ticket](https://core.trac.wordpress.org/ticket/52867). We are also keeping
our eyes on even more modern formats like AVIF and JPEGXL that will both improve
compression and further reduce resources required for compression.

## FAQ

### How can I fine tune the compression quality setting used for WebP images?

Developers or plugins can use the `wp_editor_set_quality` filterFilter Filters are
one of the two types of Hooks [https://codex.wordpress.org/Plugin_API/Hooks](https://codex.wordpress.org/Plugin_API/Hooks).
They provide a way for functions to modify data of other functions. They are the
counterpart to Actions. Unlike Actions, filters are meant to work in an isolated
manner, and should never have side effects such as affecting global variables and
output. to set the quality setting. The passed mime type enables setting by type,
for example:

    ```notranslate
    // Use a quality setting of 75 for WebP images.
    function filter_webp_quality( $quality, $mime_type ) {
      if ( 'image/webp' === $mime_type ) {
         return 75;
      }
      return $quality;
    }
    add_filter( 'wp_editor_set_quality', 'filter_webp_quality', 10, 2 );
    ```

### What happens if I enable the filter to use WebP sub-sizes, but upload JPEG? Do the sub-sizes have to match the original?

By default, WordPres creates the sub-sized images of the same type as the uploaded
file, so uploaded WebP files to get WebP files on your site. If you want to experiment
with uploading JPEG and having WordPress auto-convert these to WebP for your sub-
sized images, check out this [plugin](https://github.com/adamsilverstein/wordpress-modern-images)(
related [trac ticket](https://core.trac.wordpress.org/ticket/52867)).

### If I use WordPress multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also **network**, **blog**, **site**, will all my sites work with WebP images?

No. Multisite stores the file types that users are allowed to upload when a site
is created. We are working on improving this in [#53167](https://core.trac.wordpress.org/ticket/53167).
In the meantime, to ensure all existing sites on a networknetwork (versus site, 
blog) allow WebP files, you can use the `site_option` filter in a network mu-pluginPlugin
A plugin is a piece of software containing a group of functions that can be added
to a WordPress website. They can extend functionality or add new features to your
WordPress websites. WordPress plugins are written in the PHP programming language
and integrate seamlessly with WordPress. These can be free in the WordPress.org 
Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
or can be cost-based plugin from a third-party. to add `webp` to the allowed file
types for all network sites:

    ```notranslate
    // Ensure all network sites include WebP support.
    add_filter(
      'site_option_upload_filetypes',
      function ( $filetypes ) {
        $filetypes = explode( ' ', $filetypes );
        if ( ! in_array( 'webp', $filetypes, true ) ) {
          $filetypes[] = 'webp';
        }
        $filetypes   = implode( ' ', $filetypes );

        return $filetypes;
      }
    );
    ```

[#5-8](https://make.wordpress.org/core/tag/5-8/), [#core-images](https://make.wordpress.org/core/tag/core-images/),
[#dev-notes](https://make.wordpress.org/core/tag/dev-notes/), [#images](https://make.wordpress.org/core/tag/images/)

 [  ](https://profiles.wordpress.org/tweetythierry/) [Thierry Muller](https://profiles.wordpress.org/tweetythierry/)
8:49 pm _on_ September 15, 2020     
Tags: images, [proposal ( 40 )](https://make.wordpress.org/core/tag/proposal/),
[SEO ( 6 )](https://make.wordpress.org/core/tag/seo/)   

# 󠀁[Enhancing image preview: core proposal](https://make.wordpress.org/core/2020/09/15/enhancing-image-preview-core-proposal/)󠁿

For many years search engine results have shown various images size publicly made
available by site owners. Last year (September 2019), some extra controls over the
content preview was [introduced to Google Search](https://webmasters.googleblog.com/2019/09/more-controls-on-search.html)
followed by Bing who [announced](https://blogs.bing.com/webmaster/april-2020/Announcing-new-options-for-webmasters-to-control-their-snippets-at-Bing)
similar capabilitiescapability A **capability** is permission to perform one or 
more types of task. Checking if a user has a capability is performed by the `current_user_can`
function. Each user of a WordPress site might have some permissions but not others,
depending on their role. For example, users who have the Author role usually have
permission to edit their own posts (the “edit_posts” capability), but not permission
to edit other users’ posts (the “edit_others_posts” capability). for their Search
Engine earlier this year (April 2020).

In practice, this means that many sites do not get the benefit of large image previews,
and may be losing out on traffic. Today, WordPress sites do not opt-in to large 
image previews by default even when “Search Engine Visibility” setting is turned
on.

Below is an example comparison of Discover content for small image preview vs large
image preview:

![](https://lh5.googleusercontent.com/lZpnN6V_IhegvMJrTKYqiwOvvXPw4ioDnrbfLs5bDlYDkJByQ5PjSFnWOgK3l1uWhNC5ue_ReKMF6BbiN1TPCkCvONKhV1N3KCUHhiPmIxEcar-
y_WnxQVzWTZamCxYGYifo4gJG0Q)

## Proposed Solution 

This proposal is to opt-in to large image previews by default when “Search Engine
Visibility” setting is turned on allowing search engines to display large images
resulting in an enhanced user experience and CTR (click-through rate).

Theoretically, this is as simple as conditionally injecting `<meta name="robots"
content="max-image-preview:large">` in the HTMLHTML HyperText Markup Language. The
semantic scripting language primarily used for outputting content in web browsers.
head of all pages.

WordPress may already inject a “robots” metaMeta Meta is a term that refers to the
inside workings of a group. For us, this is the team that works on internal WordPress
sites like WordCamp Central and Make WordPress. tagtag A directory in Subversion.
WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), 
the common convention of tags in version control systems. (Not to be confused with
post tags.) into a page, for example when a site is set to disallow search engines
from indexing it. To facilitate large image previews as well as exposing a central
management layer for the “robots” meta tag, a new function `wp_robots()` should 
be introduced. The function would include a **filterable list** of values to include
in the “robots” meta tag and render the meta tag **only** if necessary. Having this
centralized layer will streamline robots management and interoperability between
plugins.

**By default**, the list would cover the following values:

 * `noindex`, to be included when search engines are disallowed from indexing the
   page or due to certain other circumstances
 * `nofollow`, to be included when `noindex` is provided when search engines are
   disallowed from indexing the page
 * `follow`, to be included when `noindex` is provided due to certain other circumstances
 * `max-image-preview: large`, to be included when search engines are allowed to
   index the page, and when large preview images may be used for the page

This would only be the default behavior and could be expanded or modified by plugins,
for example to add [additional robots tag directives](https://developers.google.com/search/reference/robots_meta_tag#directives).

The function would be hooked into `wp_head` and other relevant actions, and it would
essentially supersede the existing [`noindex()`](https://developer.wordpress.org/reference/functions/noindex/)
and [`wp_no_robots()`](https://developer.wordpress.org/reference/functions/wp_no_robots/)
functions.

## What’s next?

Your thoughts on this proposal would be greatly valued. Please share your feedback,
questions or interest in collaboration by commenting on this post. After that we
can create a tracTrac An open source project by Edgewall Software that serves as
a bug tracker and project management tool for WordPress. ticketticket Created for
both bug reports and feature development on the bug tracker. and kick start development.

[#images](https://make.wordpress.org/core/tag/images/), [#proposal](https://make.wordpress.org/core/tag/proposal/),
[#seo](https://make.wordpress.org/core/tag/seo/)

 [  ](https://profiles.wordpress.org/kirasong/) [Kira Schroder](https://profiles.wordpress.org/kirasong/)
6:26 am _on_ October 12, 2016     
Tags: [4.7 ( 124 )](https://make.wordpress.org/core/tag/4-7/),
images, [media ( 93 )](https://make.wordpress.org/core/tag/media/)   

# 󠀁[Media Weekly Update (Oct 7)](https://make.wordpress.org/core/2016/10/12/media-weekly-update-oct-7/)󠁿

This post serves to jump-start discussion before the weekly check in, which takes
place in [#core-images](https://wordpress.slack.com/archives/core-images/) on SlackSlack
Slack is a Collaborative Group Chat Platform [https://slack.com/](https://slack.com/).
The WordPress community has its own Slack Channel at [https://make.wordpress.org/chat/](https://make.wordpress.org/chat/).
The next meeting is [Friday, October 14 at 17:00 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20161014T1700)
and agenda for these meetings includes moving priority tasks forward, providing 
feedback on issues of interest, and reviewing [media focused tickets](https://core.trac.wordpress.org/query?status=accepted&status=assigned&status=new&status=reopened&status=reviewing&component=Media&group=milestone&col=id&col=summary&col=owner&col=type&col=priority&col=version&col=severity&order=priority)
on TracTrac An open source project by Edgewall Software that serves as a bug tracker
and project management tool for WordPress..

## Summary from last week

The last meeting was [Friday, October 7 at 17:00 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20161007T1700).
You can read the entire chat log in the [#core-images](https://wordpress.slack.com/archives/core-images/p1475859681000782)
channel on Slack.

**Attendees:** [@karmatosed](https://profiles.wordpress.org/karmatosed/), [@joemcgill](https://profiles.wordpress.org/joemcgill/),
[@mikeschroder](https://profiles.wordpress.org/mikeschroder/), [@swissspidy](https://profiles.wordpress.org/swissspidy/),
[@flixos90](https://profiles.wordpress.org/flixos90/), [@desrosj](https://profiles.wordpress.org/desrosj/),
[@azaozz](https://profiles.wordpress.org/azaozz/), [@paaljoachim](https://profiles.wordpress.org/paaljoachim/),
[@markoheijnen](https://profiles.wordpress.org/markoheijnen/), [@adamsilverstein](https://profiles.wordpress.org/adamsilverstein/),
[@jorbin](https://profiles.wordpress.org/jorbin/), [@designsimply](https://profiles.wordpress.org/designsimply/)

 * **Media organization improvements:**
    - [@joemcgill](https://profiles.wordpress.org/joemcgill/) opened up conversation
      about a feature project to start work on this, explaining that we have the
      chance to take a UIUI User interface/UXUX User experience first approach.
    - [@karmatosed](https://profiles.wordpress.org/karmatosed/) is going to head
      up the UI/UX side of things.
    - [@joemcgill](https://profiles.wordpress.org/joemcgill/) thinks the likely 
      first step is exploration of base taxonomyTaxonomy A taxonomy is a way to 
      group things together. In WordPress, some common taxonomies are category, 
      link, tag, or post format. [https://codex.wordpress.org/Taxonomies#Default_Taxonomies](https://codex.wordpress.org/Taxonomies#Default_Taxonomies).
      support, and a review on how it is currently broken with media.
    - [@karmatosed](https://profiles.wordpress.org/karmatosed/) asked all those 
      interested in working on this to create sketches of their ideal media categorization
      flow for review by next week.
 * **Add new coreCore Core is the set of software required to run WordPress. The
   Core Development Team builds WordPress. media widgetWidget A WordPress Widget
   is a small block that performs a specific function. You can add these widgets
   in sidebars also known as widget-ready areas on your web page. WordPress widgets
   were originally created to provide a simple and easy-to-use way of giving design
   and structure control of the WordPress theme to the user. ([#32417](https://core.trac.wordpress.org/ticket/32417))**–
   [@joemcgill](https://profiles.wordpress.org/joemcgill/) noted that the runway
   for 4.7 is ending, but work can continue for a future release. [@designsimply](https://profiles.wordpress.org/designsimply/)
   to refresh the current patchpatch A special text file that describes changes 
   to code, by identifying the files and lines which are added, removed, and altered.
   It may also be referred to as a **diff**. A patch can be _applied_ to a codebase
   for testing. on the ticketticket Created for both bug reports and feature development
   on the bug tracker. by Monday (October 10), and may target images specifically
   as a first step (this is still missing a refreshed patch).
 * **Rotate Full Size Images on Upload ([#14459](https://core.trac.wordpress.org/ticket/14459))**–
   [@mikeschroder](https://profiles.wordpress.org/mikeschroder/) profiled this and
   found that while the clock time for checking and setting orientation is minimal,
   it took ~230ms for an iPhone 7-sized image to be rotated (total 5.6s resize time)
   on a shared test server. He thinks total resize time should be reduced before
   this is added, and that [#37140](https://core.trac.wordpress.org/ticket/37140)
   is a better step for 4.7. After discussion with [@markoheijnen](https://profiles.wordpress.org/markoheijnen/)
   and [@azaozz](https://profiles.wordpress.org/azaozz/), consensus seems to be 
   that benchmarking of upload vs manual rotation should be done to prove the UX
   case for [#37140](https://core.trac.wordpress.org/ticket/37140) over [#14459](https://core.trac.wordpress.org/ticket/14459).
 * **Accents in attachment filenames should be sanitized ([#22363](https://core.trac.wordpress.org/ticket/22363))**–
   [@joemcgill](https://profiles.wordpress.org/joemcgill/) pointed out the new patch
   here from [@gitlost](https://profiles.wordpress.org/gitlost/), which looks promising.
   [@swissspidy](https://profiles.wordpress.org/swissspidy/) to take a look over
   the weekend (feedback is on ticket now, but could use more eyes).
 * **Better PDF Upload Management ([#31050](https://core.trac.wordpress.org/ticket/31050))**–
   Everyone likes this, but time running out for 4.6. [@markoheijnen](https://profiles.wordpress.org/markoheijnen/)
   to target next patch by Wednesday (Oct 12) (this was moved out of the milestone,
   as it’s currently missing a refreshed patch).
 * **Responsive images (srcset) can include images larger than the full size ([#36477](https://core.trac.wordpress.org/ticket/36477))**–
   [@mikeschroder](https://profiles.wordpress.org/mikeschroder/) didn’t have time
   to performance test the patch. To do so shortly and post feedback on the ticket(
   feedback is on ticket now).

## Agenda for the next meeting

This week, discussion will continue on priority projects for the 4.7 release. If
you have specific tickets that you want to have discussed, feel free to leave a 
comment on this post or reach out on Slack in the [#core-images](https://wordpress.slack.com/archives/core-images/)
channel.

Edit: Updated post per status on Wednesday, Oct 12.

[#4-7](https://make.wordpress.org/core/tag/4-7/), [#images](https://make.wordpress.org/core/tag/images/),
[#media](https://make.wordpress.org/core/tag/media/)

 [  ](https://profiles.wordpress.org/kirasong/) [Kira Schroder](https://profiles.wordpress.org/kirasong/)
10:51 pm _on_ October 3, 2016     
Tags: [4.7 ( 124 )](https://make.wordpress.org/core/tag/4-7/),
images, [media ( 93 )](https://make.wordpress.org/core/tag/media/)   

# 󠀁[Media Weekly Update (Sept 30)](https://make.wordpress.org/core/2016/10/03/media-weekly-update-sept-30/)󠁿

This post serves to jump-start discussion before the weekly check in, which takes
place in [#core-images](https://wordpress.slack.com/archives/core-images/) on SlackSlack
Slack is a Collaborative Group Chat Platform [https://slack.com/](https://slack.com/).
The WordPress community has its own Slack Channel at [https://make.wordpress.org/chat/](https://make.wordpress.org/chat/).
The next meeting is [Friday, October 7 at 17:00 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20161007T1700)
and agenda for these meetings includes moving priority tasks forward, providing 
feedback on issues of interest, and reviewing [media focused tickets](https://core.trac.wordpress.org/query?status=accepted&status=assigned&status=new&status=reopened&status=reviewing&component=Media&group=milestone&col=id&col=summary&col=owner&col=type&col=priority&col=version&col=severity&order=priority)
on TracTrac An open source project by Edgewall Software that serves as a bug tracker
and project management tool for WordPress..

## Summary from last week

The last meeting was [Friday, September 30 at 17:00 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20160930T1700).
You can read the entire chat log in the [#core-images](https://wordpress.slack.com/archives/core-images/p1475254846000596)
channel on Slack.

**Attendees:** [@joemcgill](https://profiles.wordpress.org/joemcgill/), [@mikeschroder](https://profiles.wordpress.org/mikeschroder/),
[@swissspidy](https://profiles.wordpress.org/swissspidy/), [@flixos90](https://profiles.wordpress.org/flixos90/),
[@azaozz](https://profiles.wordpress.org/azaozz/)

 * **Unexpected change to media title behavior in WP 4.6.1 ([#37989](https://core.trac.wordpress.org/ticket/37989))**–
   [@joemcgill](https://profiles.wordpress.org/joemcgill/) noted that [@sergey](https://profiles.wordpress.org/sergey/)
   found a fix for the remaining UTF-8 issues and it has been committed to trunktrunk
   A directory in Subversion containing the latest development code in preparation
   for the next major release cycle. If you are running "trunk", then you are on
   the latest revision., but needs to be backported still. [@joemcgill](https://profiles.wordpress.org/joemcgill/)
   working on getting this done. Test please!
 * **Downscale to only smaller images with srcset ([#36477](https://core.trac.wordpress.org/ticket/36477))**–
   It looks like a true fix is not likely to land in 4.7, since this would have 
   likely been part of changing the way WordPress handles full size images. [@mikeschroder](https://profiles.wordpress.org/mikeschroder/)
   and [@joemcgill](https://profiles.wordpress.org/joemcgill/) to test the current
   patchpatch A special text file that describes changes to code, by identifying
   the files and lines which are added, removed, and altered. It may also be referred
   to as a **diff**. A patch can be _applied_ to a codebase for testing. for performance
   and SSIM.
 * **Better PDF thumbnails ([#31050](https://core.trac.wordpress.org/ticket/31050))**–
   [@markoheijnen](https://profiles.wordpress.org/markoheijnen/) was not able to
   attend, but previously noted that he is continuing work on this for a week or
   two to try to make 4.7.
 * **WordPress image’s title is not alt ([#34635](https://core.trac.wordpress.org/ticket/34635))**–
   [@joemcgill](https://profiles.wordpress.org/joemcgill/) chatted with the AccessibilityAccessibility
   Accessibility (commonly shortened to a11y) refers to the design of products, 
   devices, services, or environments for people with disabilities. The concept 
   of accessible design ensures both “direct access” (i.e. unassisted) and “indirect
   access” meaning compatibility with a person’s assistive technology (for example,
   computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) team 
   about this, and the suggestion is that WordPress should no longer guess at an
   appropriate `alt` if the user hasn’t explicitly added one. He notes that this
   shouldn’t be that difficult to patch, but the change will need to be well communicated.
 * **`image_send_to_editor` filterFilter Filters are one of the two types of Hooks
   [https://codex.wordpress.org/Plugin_API/Hooks](https://codex.wordpress.org/Plugin_API/Hooks).
   They provide a way for functions to modify data of other functions. They are 
   the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated
   manner, and should never have side effects such as affecting global variables
   and output. is not fired when an Image is edited or replaced in TinyMCE ([#34823](https://core.trac.wordpress.org/ticket/34823))**–
   Based on [@adamsilverstein](https://profiles.wordpress.org/adamsilverstein/)‘
   s feedback, it looks like the ticketticket Created for both bug reports and feature
   development on the bug tracker. should be closed, as there’s a different filter
   intended for this purpose.
 * **Usage of `image_size_names_choose` breaks JSJS JavaScript, a web scripting 
   language typically executed in the browser. Often used for advanced user interfaces
   and behaviors. attachment model attributes ([#34981](https://core.trac.wordpress.org/ticket/34981))**–
   Chatted about a bit of background. [@azaozz](https://profiles.wordpress.org/azaozz/)
   took a look and posted a new patch for review.
 * **Sanitize accents in attachment filenames ([#22363](https://core.trac.wordpress.org/ticket/22363))**–
   From [@gitlost](https://profiles.wordpress.org/gitlost/)’s comments, it looks
   like there are fixes in `remove_accents()` necessary that should happen first,
   and would likely fix the base bugbug A bug is an error or unexpected result. 
   Performance improvements, code optimization, and are considered enhancements,
   not defects. After feature freeze, only bugs are dealt with, with regressions(
   adverse changes from the previous version) being the highest priority. here. 
   His work on it is mostly in [#24661](https://core.trac.wordpress.org/ticket/24661).
   [@mikeschroder](https://profiles.wordpress.org/mikeschroder/) to dig into the
   progress of Safari’s support of these filenames. Feedback from those who have
   strong knowledge in UTF/character encodings would be appreciated.
 * **Rotate Full Size Images on Upload ([#14459](https://core.trac.wordpress.org/ticket/14459)
   and [#37140](https://core.trac.wordpress.org/ticket/37140))** – Would rather 
   not destroy EXIF/IPTC in full size images (with GD), so may be better to fix 
   this in Imagick first. Needs performance testing. Comment left on ticket.
 * **Add new coreCore Core is the set of software required to run WordPress. The
   Core Development Team builds WordPress. media widgetWidget A WordPress Widget
   is a small block that performs a specific function. You can add these widgets
   in sidebars also known as widget-ready areas on your web page. WordPress widgets
   were originally created to provide a simple and easy-to-use way of giving design
   and structure control of the WordPress theme to the user. ([#32417](https://core.trac.wordpress.org/ticket/32417))**–
   No updates here. May not be 4.7 at this point, but [@joemcgill](https://profiles.wordpress.org/joemcgill/)
   reaching out to [@designsimply](https://profiles.wordpress.org/designsimply/)
   for status.
 * **Media organization improvements:**
    - Make media library searchable by filename ([#22744](https://core.trac.wordpress.org/ticket/22744))–
      [@joemcgill](https://profiles.wordpress.org/joemcgill/) added a patch to fix
      a JOIN issue found by [@flixos90](https://profiles.wordpress.org/flixos90/).
      Please continue testing this, especially with large media libraries.
    - [@flixos90](https://profiles.wordpress.org/flixos90/) opened a GitHubGitHub
      GitHub is a website that offers online implementation of git repositories 
      that can easily be shared, copied and modified by other developers. Public
      repositories are free to host, private repositories require a paid subscription.
      GitHub introduced the concept of the ‘pull request’ where code changes done
      in branches by contributors can be reviewed and discussed before being merged
      by the repository owner. [https://github.com/](https://github.com/) repo to
      work on media taxonomies/UIUI User interface, and is organizing a feature 
      project around it. [@joemcgill](https://profiles.wordpress.org/joemcgill/)
      suggests an initial meeting with [@karmatosed](https://profiles.wordpress.org/karmatosed/)
      for high level direction, followed by changes in the pluginPlugin A plugin
      is a piece of software containing a group of functions that can be added to
      a WordPress website. They can extend functionality or add new features to 
      your WordPress websites. WordPress plugins are written in the PHP programming
      language and integrate seamlessly with WordPress. These can be free in the
      WordPress.org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
      or can be cost-based plugin from a third-party., or core directly where appropriate.

## Agenda for the next meeting

This week, discussion will continue on priority projects for the 4.7 release. If
you have specific tickets that you want to have discussed, feel free to leave a 
comment on this post or reach out on Slack in the [#core-images](https://wordpress.slack.com/archives/core-images/)
channel.

[#4-7](https://make.wordpress.org/core/tag/4-7/), [#images](https://make.wordpress.org/core/tag/images/),
[#media](https://make.wordpress.org/core/tag/media/)

 [  ](https://profiles.wordpress.org/ellatrix/) [Ella Van Durpe](https://profiles.wordpress.org/ellatrix/)
8:24 pm _on_ April 14, 2016     
Tags: [4.6 ( 140 )](https://make.wordpress.org/core/tag/4-6/),
[image-editor ( 3 )](https://make.wordpress.org/core/tag/image-editor/), images,
[media ( 93 )](https://make.wordpress.org/core/tag/media/), [respimg ( 6 )](https://make.wordpress.org/core/tag/respimg/)

# 󠀁[Media Chat](https://make.wordpress.org/core/2016/04/14/media-chat/)󠁿

In the regular [#core-images](https://wordpress.slack.com/messages/core-images/)
chat this [Friday, 15 April, 19:00 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20160415T1900)
we are planning to discuss enhancements for 4.6. So far there are four items on 
the agenda:

 * We are planning to add responsive images to the editor and discuss different 
   implementation methods, e.g. saving `srcset` and `sizes` attributes to the database
   versus generating them on the front end. See [#36475](https://core.trac.wordpress.org/ticket/36475).
 * The makers of TinyMCE recently released [JavaScript image tools](https://www.npmjs.com/package/%40ephox/imagetools)
   for editing images in the browser which could replace the current server based
   image editor. The new editor would be quite faster, allowing you to edit and 
   resize images before uploading them, and it would be easier to include in other
   scripts. This may well be a feature project over a few releases.
 * PDF preview images. See [#31050](https://core.trac.wordpress.org/ticket/31050).
 * Continue to improve mixed content issues on HTTPSHTTPS HTTPS is an acronym for
   Hyper Text Transfer Protocol Secure. HTTPS is the secure version of HTTP, the
   protocol over which data is sent between your browser and the website that you
   are connected to. The 'S' at the end of HTTPS stands for 'Secure'. It means all
   communications between your browser and the website are encrypted. This is especially
   helpful for protecting sensitive data like banking information. sites. See [#34945](https://core.trac.wordpress.org/ticket/34945).

If you have more ideas or tickets to discuss regarding media, please join us or 
leave a comment here. 🙂

[#4-6](https://make.wordpress.org/core/tag/4-6/), [#image-editor](https://make.wordpress.org/core/tag/image-editor/),
[#images](https://make.wordpress.org/core/tag/images/), [#media](https://make.wordpress.org/core/tag/media/),
[#respimg](https://make.wordpress.org/core/tag/respimg/)

 [  ](https://profiles.wordpress.org/joemcgill/) [Joe McGill](https://profiles.wordpress.org/joemcgill/)
3:46 pm _on_ March 12, 2016     
Tags: [4.5 ( 60 )](https://make.wordpress.org/core/tag/4-5/),
[dev-notes ( 652 )](https://make.wordpress.org/core/tag/dev-notes/), images, [media ( 93 )](https://make.wordpress.org/core/tag/media/),
[optimization ( 7 )](https://make.wordpress.org/core/tag/optimization/), [performance ( 420 )](https://make.wordpress.org/core/tag/performance/)

# 󠀁[Performance improvements for images in WordPress 4.5](https://make.wordpress.org/core/2016/03/12/performance-improvements-for-images-in-wordpress-4-5/)󠁿

WordPress 4.5 includes a few performance enhancements for images.

## 󠀁[󠀁[Increased image compression for custom sizes

WordPress 4.5 increases the amount of compression applied to intermediate sizes 
by changing the default quality in `WP_Image_Editor` from 90 to 82. As noted in 
[the proposal](https://make.wordpress.org/core/2016/02/22/proposal-increase-the-default-image-compression-in-wordpress/)
for this change, this results in a noticeable reduction in file sizes with little
change in visual quality. Developers can override the default image quality value
using the `wp_editor_set_quality` filterFilter Filters are one of the two types 
of Hooks [https://codex.wordpress.org/Plugin_API/Hooks](https://codex.wordpress.org/Plugin_API/Hooks).
They provide a way for functions to modify data of other functions. They are the
counterpart to Actions. Unlike Actions, filters are meant to work in an isolated
manner, and should never have side effects such as affecting global variables and
output..

## 󠀁[󠀁[Improved resizing settings for ImageMagick

For sites making use of ImageMagick, we’ve reduced file sizes further by resizing
images  more efficiently in `WP_Image_Editor_Imagick` and by stripping extraneous
metadata using the new `WP_Image_Editor_Imagick::strip_image()` method.

For now, ‘icc’ and ‘icm’ color profiles are retained, along with ‘exif’, ‘xmp’, 
and ‘iptc’ profiles, which can contain copyright and orientation data. Those who
want to retain additional metadata can disable profile stripping by adding a callback
function to the `image_strip_meta` hook that returns `false`.

Note that the original full sized images uploaded to WordPress are unaffected by
these changes.

## 󠀁[󠀁[Introduction of `wp_get_upload_dir()`

As Jeremy Felt mentioned in [his post on Multisite changes](https://make.wordpress.org/core/2016/03/09/multisite-focused-changes-in-4-5/),`
wp_upload_dir()` received a major performance overhaul in this release. Those changes
were pared with the addition of a new function, `wp_get_upload_dir()`, which can
be used as a more performant way to display information about the uploads directory
on the front end. This is particularly useful when building URLs for images in templates.(
See [#34359](https://core.trac.wordpress.org/ticket/34359))

[#4-5](https://make.wordpress.org/core/tag/4-5/), [#dev-notes](https://make.wordpress.org/core/tag/dev-notes/),
[#images](https://make.wordpress.org/core/tag/images/), [#media](https://make.wordpress.org/core/tag/media/),
[#optimization](https://make.wordpress.org/core/tag/optimization/), [#performance](https://make.wordpress.org/core/tag/performance/)

 [  ](https://profiles.wordpress.org/joemcgill/) [Joe McGill](https://profiles.wordpress.org/joemcgill/)
12:51 pm _on_ February 22, 2016     
Tags: [image-editor ( 3 )](https://make.wordpress.org/core/tag/image-editor/),
images, [media ( 93 )](https://make.wordpress.org/core/tag/media/), [performance ( 420 )](https://make.wordpress.org/core/tag/performance/)

# 󠀁[Proposal: Increase the default image compression in WordPress](https://make.wordpress.org/core/2016/02/22/proposal-increase-the-default-image-compression-in-wordpress/)󠁿

This proposal was merged to coreCore Core is the set of software required to run
WordPress. The Core Development Team builds WordPress.Core Core is the set of software
required to run WordPress. The Core Development Team builds WordPress. in [[36615]](https://core.trac.wordpress.org/changeset/36615).
[Download the latest nightly build](https://wordpress.org/nightly-builds/wordpress-latest.zip)
and give it a try!

In order to improve page load performance, I propose that the default image compression
setting be changed from 90 to 82 in WordPress. Let’s get into why.

### Background

The default quality setting for resized images in WordPress has been 90 since the`
image_resize()` function was shipped in [version 2.5](https://core.trac.wordpress.org/browser/tags/2.5/wp-includes/media.php#L178).
This setting creates images with much larger file sizes than recommended by modern
web best practices.

Over the past several years, the importance of performance has been highlighted 
as users access the web globally on slower connections, and performance has even
started being [used by search engines](https://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html)
to influence search results.

Tools like [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/)
and [WebPagetest](http://www.webpagetest.org/) will warn site owners if images aren’t
sufficiently compressed. For example, the glossary at the bottom of the [WebPagetest performance optimization page](http://www.webpagetest.org/performance_optimization.php)
states:

> Within 10% of a photoshop quality 50 will pass, up to 50% larger will warn and
> anything larger than that will fail. The overall score is the percentage of image
> bytes that can be saved by re-compressing the images.

### Research

With this in mind, web developer and performance advocate Dave Newton [published recommendations for ImageMagick compression settings](https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/)
based on his research comparing various ImageMagick settings against Photoshop’s‘
high quality’ (60) setting for JPEGs. He found that an Imagick compression setting
of 82 was closest to this using an objective measurement named [DSSIM](https://en.wikipedia.org/wiki/Structural_similarity#Variants)
to compare the visual similarity between two images.

We experimented with Dave’s settings in the [RICG Responsive Images plugin](https://github.com/ResponsiveImagesCG/wp-tevko-responsive-images)
during the 4.3 cycle and found that not all Dave’s suggestions can be easily applied
by default in WordPress due to the [memory required](https://github.com/ResponsiveImagesCG/wp-tevko-responsive-images/issues/150)
to process large images on shared hosts. However, changing the default image quality
setting is a relatively small change that makes a big impact on file size without
sacrificing much in the way of perceived image quality.

  [⌊Owl⌉](https://make.wordpress.org/core/files/2016/02/2A-3-1.jpg)   Example of
an image compressed using the current default quality of 90.   [⌊Owl⌉](https://make.wordpress.org/core/files/2016/02/2A-3.jpg)
Example image compressed with a quality setting of 82.

In research released in 2014, compressed images with a DSSIM score of 0.015 were
deemed acceptable to most people. In [tests of several different images](https://docs.google.com/spreadsheets/d/1d3eCRkQCYLY30bBOdpFhgqbUIMX1GYpbyMnADKV4V_Y/edit?usp=sharing),
I found that changing the default compression setting in `WP_Image_Editor` from 
90 to 82 reduced image sizes by an average of ~25% with DSSIM scores ranging from
0.0014 to 0.0019 for ImageMagick and 0.0019 to 0.0023 for GD — both of which are
drastically under the 0.015 threshold cited above.

### Proposal

Given these results, I suggest making the change to 82 for the default image compression
setting. You can follow the discussion on the related ticketticket Created for both
bug reports and feature development on the bug tracker. ([33642](https://core.trac.wordpress.org/ticket/33642))
and give feedback in the comments or in the [#core-images](https://wordpress.slack.com/messages/core-images/)
channel on SlackSlack Slack is a Collaborative Group Chat Platform [https://slack.com/](https://slack.com/).
The WordPress community has its own Slack Channel at [https://make.wordpress.org/chat/](https://make.wordpress.org/chat/).

As a reminder, this setting only applies to the intermediate sizes that WordPress
creates, and not the original files uploaded by users. For any users who need to
maintain a higher image quality for intermediate sizes, the default quality can 
still be changed with the `wp_editor_set_quality` filterFilter Filters are one of
the two types of Hooks [https://codex.wordpress.org/Plugin_API/Hooks](https://codex.wordpress.org/Plugin_API/Hooks).
They provide a way for functions to modify data of other functions. They are the
counterpart to Actions. Unlike Actions, filters are meant to work in an isolated
manner, and should never have side effects such as affecting global variables and
output..

[#image-editor](https://make.wordpress.org/core/tag/image-editor/), [#images](https://make.wordpress.org/core/tag/images/),
[#media](https://make.wordpress.org/core/tag/media/), [#performance](https://make.wordpress.org/core/tag/performance/)

 [  ](https://profiles.wordpress.org/ryan/) [Ryan Boren](https://profiles.wordpress.org/ryan/)
6:45 pm _on_ March 27, 2009     
Tags: images, [javascript ( 130 )](https://make.wordpress.org/core/tag/javascript/)

# 󠀁[Image header cropping now uses Jcrop.](https://make.wordpress.org/core/2009/03/27/image-header-cropping-now-uses-jcrop/)󠁿

Image headerHeader The header of your site is typically the first thing people will
experience. The masthead or header art located across the top of your page is part
of the look and feel of your website. It can influence a visitor’s opinion about
your content and you/ your organization’s brand. It may also look different on different
screen sizes. cropping now uses [Jcrop](http://deepliquid.com/content/Jcrop.html).

[#images](https://make.wordpress.org/core/tag/images/), [#javascript](https://make.wordpress.org/core/tag/javascript/)