[wp-hackers] the_post_thumbnail 'full' with no width/height attr

Otto otto at ottodestruct.com
Tue Feb 15 18:03:20 UTC 2011


On Tue, Feb 15, 2011 at 11:32 AM, Kevin Newman <CaptainN at unfocus.com> wrote:
> Hello,
>
> I'm trying to use 'the_post_thumbnail' to output the full size image (the
> original size not resized by wordpress), but without outputting the width
> and height (I'd like them width="100%" height="" actually, but empty would
> be good enough).
>
> Is there anyway to do that with this function, or will I have to build my
> image tag manually?

You'd have to build it manually. WordPress always puts those there
because without them, you have to wait for the image to load before
the page will render, since the browser can't reserve the space for it
until it knows the size it will be.

-Otto


More information about the wp-hackers mailing list