wp_get_attachment_image_sizes( int $attachment_id, array|string $size = 'medium', array $image_meta = null )

Retrieves the value for an image attachment’s ‘sizes’ attribute.


10 related functions found for: wp_get_attachment_image_sizes

Top ↑

Related terms found for this post

TaxonomyTerms
wp-parser-related-wordsattach, attachment, attachments, dimens, dimension, get, imag, image, images, media-php, post-typ, post-type, size, sizes, wp-get, wp-includes
wp-parser-packageMedia, WordPress
wp-parser-source-filewp-includes/media.php

Top ↑

Terms Used Terms Used

Terms used in the related posts query

  • attach
  • attachment
  • attachments
  • dimens
  • dimension
  • get
  • imag
  • image
  • images
  • Media
  • media-php
  • post-typ
  • post-type
  • size
  • sizes
  • wp-get
  • wp-includes
  • wp-includes/media.php
  • media

Top ↑

Description Description


Top ↑

Parameters Parameters

$attachment_id

(int) (Required) Image attachment ID.

$size

(array|string) (Optional) Image size. Accepts any valid image size, or an array of width and height values in pixels (in that order).

Default value: 'medium'

$image_meta

(array) (Optional) The image meta data as returned by 'wp_get_attachment_metadata()'.

Default value: null


Top ↑

Return Return

(string|bool) A valid source size value for use in a 'sizes' attribute or false.


Top ↑

Source Source

File: wp-includes/media.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.