This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Change Page Builder Image for Mobile Version

7 years ago · Last reply by Alex S 7 years ago

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

1
  1. Alex S Staff 7 years, 10 months ago

    Hi 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.

Have a different question or issue?

Start New Thread