Adds additional default image sub-sizes.
Description
These sizes are meant to enhance the way WordPress displays images on the front-end on larger, high-density devices. They make it possible to generate more suitable srcset
and sizes
attributes when the users upload large images.
The sizes can be changed or removed by themes and plugins but that is not recommended.
The size "names" reflect the image dimensions, so changing the sizes would be quite misleading.
Source
* @since 4.2.0
*
* @param int|null $post_id The post_id (if any) found by the function.
* @param string $url The URL being looked up.
*/
return (int) apply_filters( 'attachment_url_to_postid', $post_id, $url );
Changelog
Version | Description |
---|---|
5.3.0 | Introduced. |
To remove those two image sizes you can use the code below:
Code can be added to
functions.php
file of the theme.