Images (category)

file_is_displayable_image()

Checks if the file is an image (if it is suitable for display on the page). Conditional tag.

image_downsize()

Gets an array of image data for the specified size: URL, width and height of the attachment image.

next_image_link()

Displays a link to the next image attached to the post.

previous_image_link()

Outputs a link to the previous image attached to the post. Returns the HTML code of the link.

wp_attachment_is_image()

Determines whether the specified post is WordPress attachment image. A conditional tag.

wp_get_attachment_caption()

Retrieves the caption of specified attachment.

wp_get_attachment_image()

Gets the <img> tag of the image of the specified attachment (file attached to the post).

wp_get_attachment_image_sizes()

Gets the size values of the specified attachment image for the sizes attribute.

wp_get_attachment_image_src()

Gets an array of data for the specified image: URL, width, height of the attachment image.

wp_get_attachment_image_srcset()

Gets the value of the srcset attribute for the <img> tag. The value will contain the names of all sizes of the specified image in the format: image.jpg 1x, image-sm.jpg 640w.

wp_get_attachment_image_url()

Gets the URL of the attachment image by the provided image ID. You can also specify the size of the image for which you need to get the URL.

wp_get_image_mime()

Gets the real MIME type of an image file.