Skip to content

Use custom sizes attribute with the_post_thumbnail #268

Closed
@hovereffect

Description

@hovereffect

Hello,

I'm really excited about responsive images being merged into the WordPress core, and I've been testing it this morning. It's hard to find real documentation about it as I've seen many times "No configuration is needed" and I hope I'm at the right place to ask questions.
So. I've used the_post_thumbnail() on a page but the rendered image is the full size one.
Sure I could pass a custom size, like the_post_thumbnail('medium'), but then I have no control over the sizes attribute.
Is there a way to pass custom sizes attributes to the_post_thumbnail()? Without having to manually rewrite all the output.

Thanks a lot for your work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions