Use of HTML 5.1 <picture>?

For support and discussion related to templates, themes, and imagesets in phpBB 3.1.
Anti-Spam Guide
Locked
Holger
Registered User
Posts: 1883
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Use of HTML 5.1 <picture>?

Post 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
User avatar
PayBas
Former Team Member
Posts: 930
Joined: Thu May 25, 2006 12:37 am

Re: Use of HTML 5.1 <picture>?

Post 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.
Holger
Registered User
Posts: 1883
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: Use of HTML 5.1 <picture>?

Post by Holger »

Yeah, I feared that! ;-)
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Use of HTML 5.1 <picture>?

Post by david63 »

Just a thought - would it work as a bbcode?
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
callumacrae
Former Team Member
Posts: 2662
Joined: Tue Feb 12, 2008 12:28 pm
Location: London, UK
Name: Callum Macrae
Contact:

Re: Use of HTML 5.1 <picture>?

Post 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/
macr.ae = my website. you probably won't like it.
Proud user ofProud user of
User avatar
callumacrae
Former Team Member
Posts: 2662
Joined: Tue Feb 12, 2008 12:28 pm
Location: London, UK
Name: Callum Macrae
Contact:

Re: Use of HTML 5.1 <picture>?

Post 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/
macr.ae = my website. you probably won't like it.
Proud user ofProud user of
Holger
Registered User
Posts: 1883
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: Use of HTML 5.1 <picture>?

Post 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.
Locked

Return to “[3.1.x] Styles Support & Discussion”