Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Im running 'the loop' and I want to get the image of the post (in original size - not thumbnail), how do I do it?

thank you.

share|improve this question
    
the "Featured Image"? or an image within the post? –  goldenapples Jan 24 '11 at 21:29

3 Answers 3

The function the_post_thumbnail() grabs the featured image for you. You can specify the full size image like this, I think: the_post_thumbnail('full')

share|improve this answer

Hi @Luis:

WordPress' image handling is tricky, and inconsistent in the edge cases so this may or may not be what you are looking for but I think what you want is this:

wp_get_attachment_url($post->ID);

That will give you the URL of the attached file in it's full size, but if that doesn't give you what you need I'll need you do give me more information about which images you are talking about; Featured, in the Media section, in your posts, etc? Screenshots of your admin where you enter photos will help too.

share|improve this answer

You have a lot of ways to get_attachments,

wp_get_attachment_url($post->ID);  

wp_get_attachment_link($id=0, $size='full', $permalink=false, $icon=false); 

Here is a complete list of get_attachment possibilities,
http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.