Answers for "wp_get_attachment_image custom size"

PHP
2

wp_get_attachment_image class

<?php 
  // ADD CLASS on wp image function 
  echo wp_get_attachment_image( get_the_ID(), array('700', '600'), "", array( "class" => "img-responsive" ) );  
?>
Posted by: Guest on May-26-2021
0

wordpress get attachment url by size

//Get WordPress attachment by size
<img src="<?php echo wp_get_attachment_image_url($image['id'],'medium_large'); ?>" loading="lazy">
//can be thumbnail, medium, medium_large, large, full
Posted by: Guest on April-11-2022

Code answers related to "wp_get_attachment_image custom size"

Browse Popular Code Answers by Language