Page 1 of 1

Use of HTML 5.1 <picture>?

Posted: Thu Oct 09, 2014 8:21 am
by Holger
Hello,

in HTML 5.1 there is a new element <picture> (already supported by Chrome 38 and maybe others).
<picture> is not defined as a replacement for img, it is a superset.
As modern browsers ignore tags they dont understand it can be used side-by-side:

Code: Select all

<picture>
    <source media="(min-width: 45em)" srcset="large.jpg">
    <source media="(min-width: 32em)" srcset="med.jpg">
    <img src="small.jpg" alt="The president giving an award.">
</picture>
Is this something that will/can be implemented in phpBB to support the "responsivness"?

Best regards
Holger

Re: Use of HTML 5.1 <picture>?

Posted: Thu Oct 09, 2014 9:56 am
by PayBas
No, this is not something you will see in phpBB any time soon.

For this to be effective, we would need to rewrite a significant part of the attachments code (supporting multiple sizes of the same files). And the very limited browser support for this feature at the moment means that it will be very low on the priority list.

Your best hope for this will be if an extension author wants to implement this.

Re: Use of HTML 5.1 <picture>?

Posted: Thu Oct 09, 2014 9:59 am
by Holger
Yeah, I feared that! ;-)

Re: Use of HTML 5.1 <picture>?

Posted: Thu Oct 09, 2014 10:31 am
by david63
Just a thought - would it work as a bbcode?

Re: Use of HTML 5.1 <picture>?

Posted: Tue Oct 21, 2014 10:28 am
by callumacrae
What? Why would you need the picture element in phpBB? Sure, srcset and sizes might be useful—although phpBB is low resolution already, and not at all set up with a front-end build system—but definitely not the picture element.

I suspect you're confused: http://blog.cloudfour.com/dont-use-pict ... -the-time/

Re: Use of HTML 5.1 <picture>?

Posted: Tue Oct 21, 2014 10:30 am
by callumacrae
PayBas wrote:And the very limited browser support for this feature at the moment means that it will be very low on the priority list.
There's a polyfill: https://scottjehl.github.io/picturefill/

Re: Use of HTML 5.1 <picture>?

Posted: Tue Oct 21, 2014 1:22 pm
by Holger
I hope I dont confuse this all the way, but I am talking about attachments as pictures, or pictures in the IMG-tag. Not the style-pictures/graphics. Are we talking about the same thing?

My community is heavily relying on uploaded pictures and I have put very much effort in making uploads easy and effective (e.g. ported the phpBB2-"UploadPic Mod" to phpBB3 and so on). And with more people using mobile devices it would be very convenient to resize the images/photos to fit the mobile devices and bandwidths.