Remove wp_get_attachment_image Image Size
php, wordpress, wordpress-theming
Solution
@Jrod has the correct answer IMO, but you can also just call
wp_get_attachment_url($variable);
which gives you the URL to the full image. Then you can simply construct your own HTML markup for displaying the image.
Problem
Is there any way to remove the image size of the wp_get_attachment function? I was trying the following code with no luck, trying to get it either 100% or nothing at all. ``` echo wp_get_attachment_image($variable, array(100 . '%', 100 . '%')); ``` EDIT This is what I ended up with that works perfectly thanks to drew010. ``` echo '<img src="'.wp_get_attachment_url($variable).'" alt="'.get_the_title().'" />'; ```