• Hello! So the default “size” is 100vw, and i also read that adding a the attribute to the markup will override the default. But i’m sure there’s also a hook?

    A theme should be able to hook into that and tell wordpress the size of the image. Ideally the hook function should have access to the class of the image so there’d be the possibility to differentiate.

    Couldn’t find info on that! It’s hard too google because there’s so much old info out there about the resizing of image sources.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi there!

    I wonder if the lovely Simple Image Sizes plugin might meet your needs?

    If not, I’d be curious to learn more about the issue.

    Best wishes…

    Thread Starter bypr.nils

    (@byprnils)

    oh that’s not at all what i meant! I’m talking about the new responsive images implentation of the wordpress core, not the generation of image uploads!

    <img sizes="100vw" srcset="....

    Couldn’t find info on that! It’s hard too google because there’s so much old info out there about the resizing of image sources.

    exactly what i meant by this – it’s easy to be confused

    Interesting… thanks for clarifying. I just did a quick search to learn a little more about this as I’ve not used the new responsive images features, and I came across this page with a list you may have already seen… Just in case it’s helpful to you or others, here’s a list of new responsive image functions and hooks.

    Thread Starter bypr.nils

    (@byprnils)

    Yes! I have indeed seen that page, but thanks. It says functions and hooks, but then it’s only functions. Bummer.

    I mean it can’t just always be 100vw for all images not hard coded. That would make the whole thing useless.

    I’ve not used the new responsive images features

    chances are you have, because it’s automatic, which is cool.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘img sizes attribute hook?’ is closed to new replies.