Re: @type attribute on <source> elements

On 6 September 2012 22:21, Nathanael D. Jones <nathanael.jones@gmail.com> wrote:
> I'm starting a new thread about the @type attribute, as requested by Adrian
> Roselli.
>
> I believe it is critical that we REQUIRE browsers to SKIP source elements
> which have an unrecognized (or unsupported) mime-type value in the @type
> attribute.
>
> Otherwise, we will not be able to introduce to formats and simplify
> <picture> in the future.
>
> @type should be an OPTIONAL attribute, not required, but if present,
> browsers should handle it in a specific way. Widely supported formats like
> jpeg, png, and gif do not need a type="" attribute, but webp and future
> formats do.
>
> This will allow us to introduce new image formats in a backwards-compatible
> manner.
>

I'm still wondering how relevant type really is...

Yes it make sense when the element has a src but once srcset is used
doesn't it open up a can of worms as the images in a srcset may not
all be the same mimetype, for example, what should the type be for the
following element?

<img src="img.png" srcset="srcset="image.jpg 1x, image-x2.webp, #000" />

I can think of several possibilities but do any of them make sense?

Cheers

Andy

Received on Monday, 10 September 2012 08:19:23 UTC