Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

wp_get_attachment_image_url()

3 tags 1 category

wp_get_attachment_image_url() — Gets the URL of an image attachment.

Inputs: $attachment_id (int): Image attachment ID. $size (string|int[]): Optional. Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order). Default ‘thumbnail’. $icon (bool): Optional. Whether the image should be treated as an icon. Default false.

Returns string|false: Attachment URL or false if no image is available. If $size does not match any registered image size, the original image URL will be returned.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…