images.php
Responsive images handling.
Tags
Table of Contents
Functions
- add_image_sizes() : void
- Add custom image sizes.
- filter_image_attributes() : array<string|int, mixed>
- Filter the image attributes.
Functions
add_image_sizes()
Add custom image sizes.
add_image_sizes() : void
Add cropping to default medium image. Specify the size the 400px wide size. Add proportional size for medium images. Add 1160px wide 4x3 ratio for featured and in-post full-width images. Add 1160px wide proportional size for attachment pages.
Tags
filter_image_attributes()
Filter the image attributes.
filter_image_attributes(array<string|int, mixed> $attr, WP_Post $attachment, array<string|int, mixed>|string $size) : array<string|int, mixed>
Parameters
- $attr : array<string|int, mixed>
-
Array of attribute values for the image markup, keyed by attribute name.
- $attachment : WP_Post
-
Image attachment post.
- $size : array<string|int, mixed>|string
-
Requested image size.
Tags
Return values
array<string|int, mixed> —The modified attribute values for markup.