Change Page Builder Image for Mobile Version
Hey guys, I am working on my page and added a Site Origin Image widget. Now I am trying to get it to display a different image for mobile version of the page. I noticed that in the dynamically generated final html for the page this is done using srcset for various widths, as can be seen here:
<img src="http://www.pulsardp.com/wp-content/uploads/2018/04/stranka.jpg" width="1920" height="1012" srcset="http://www.pulsardp.com/wp-content/uploads/2018/04/stranka.jpg 1920w, http://www.pulsardp.com/wp-content/uploads/2018/04/telefon.jpg 300w, http://www.pulsardp.com/wp-content/uploads/2018/04/telefon.jpg 768w, http://www.pulsardp.com/wp-content/uploads/2018/04/stranka-1024x540.jpg 1024w" sizes="(max-width: 1920px) 100vw, 1920px" class="so-widget-image">.
But how do I change this on the Page Builder so that it works every time?
Thanks.
This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
1Hi Martin,
Unfortunately, there’s no way to change or override the image used on specific resolutions in the srcset. The srcset is purely the other image sizes that WordPress has for it.
I would recommend using Widget Options to allow you to indirectly do this. Basically, add another image widget (this will be the mobile image) and hide the desktop image on mobile and hide the mobile image on desktop.
Replies on this thread are closed.
Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.