Source function wp_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon = false ) { // Get a thumbnail or intermediate image if there is one. $image = image_downsize( $attachment_id, $size ); if ( ! $image ) { $src = false; if ( $icon ) { $src = wp_mime_type_icon( $attachment_id, '.svg' ); if ( $src ) { /** This filter is documented in wp-includes/post.php */ $icon_dir = apply_filt
![wp_get_attachment_image_src() – Function | Developer.WordPress.org](https://cdn-ak-scissors.b.st-hatena.com/image/square/7969d74a2c29bc3eb55f9ef6436d7aba5d0342ea/height=288;version=1;width=512/https%3A%2F%2Fdeveloper.wordpress.org%2Fwp-content%2Fthemes%2Fwporg-developer-2023%2Fimages%2Fopengraph-image.png)