Is this how it should be? <picture> tag

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
Smart771977
 
 
Posts: 6
Joined: Sat Jun 06, 2020 11:29 am

Is this how it should be? <picture> tag

Post by Smart771977 »

Good afternoon, I encountered an error with the picture tag.
When using the picture tag, the Web Builder generates this code. However, in all browsers, the image is replaced by an empty square.

<picture id="wb_Picture1">
<source media="(max-width:767px)" srcset="images_wb/2service1200.jpg,images_wb/2service320.jpg">
<source media="(max-width:1359px)" srcset="images_wb/2service1200.jpg,images_wb/2service320.jpg,images_wb/2service768.jpg">
<img src="images_wb/2service1200.jpg" id="Picture1" alt="" srcset="images_wb/2service1200.jpg,images_wb/2service320.jpg,images_wb/2service768.jpg">
/picture>


But if you fix the generated code, everything is OK. You just need to insert a space after the image instructions example


<picture id="wb_Picture1">
<source media="(max-width:767px)" srcset="images_wb/2service1200.jpg, images_wb/2service320.jpg">
<source media="(max-width:1359px)" srcset="images_wb/2service1200.jpg, images_wb/2service320.jpg, images_wb/2service768.jpg">
<img src="images_wb/2service1200.jpg" id="Picture1" alt="" srcset="images_wb/2service1200.jpg,images_wb/2service320.jpg, images_wb/2service768.jpg">
/picture>

(Just inserted a space)


This is only my bug or everyone's. WebBuilder ver 15, Last version, (lang RU/ENG)
alan_sh
 
 
Posts: 1695
Joined: Tue Jan 01, 2019 5:50 pm

Re: Is this how it should be? <picture> tag

Post by alan_sh »

Where did you put the space character?

Alan
Smart771977
 
 
Posts: 6
Joined: Sat Jun 06, 2020 11:29 am

Re: Is this how it should be? <picture> tag

Post by Smart771977 »

before
<source media="(max-width:767px)" srcset="images_wb/2service1200.jpg,images_wb/2service320.jpg">

after
<source media="(max-width:767px)" srcset="images_wb/2service1200.jpg, images_wb/2service320.jpg">
Smart771977
 
 
Posts: 6
Joined: Sat Jun 06, 2020 11:29 am

Re: Is this how it should be? <picture> tag

Post by Smart771977 »

User avatar
Pablo
 
Posts: 21713
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Is this how it should be? <picture> tag

Post by Pablo »

Thanks, I will investigate this after the weekend.

Note however that it looks like you did not use the correct file names as described here:
https://wysiwygwebbuilder.com/picture.html

Also, note that I do not recommend to start an filename with a number.
https://www.wysiwygwebbuilder.com/forum ... f=10&t=131
Smart771977
 
 
Posts: 6
Joined: Sat Jun 06, 2020 11:29 am

Re: Is this how it should be? <picture> tag

Post by Smart771977 »

Thank you so much for paying attention. First I tested with these file names pic@1.5x.png and pic@2.0x.png, but the result was the same. Therefore, I switched to a simple file name format, because I decided that it was not important.
Post Reply