Different sized images for screen...

User 332337 Photo


Registered User
120 posts

Does the edit picture function allow for me to place a lower sized image on a mobile breakpoint, and another image size (larger) for computer screen breakpoints?

Not finding if the different sized images are present or not. I see an image, but the file name is not present.

I think I did this with an older version of RSD for faster mobile screen loading.

Thank you - K
User 122279 Photo


Senior Advisor
14,461 posts

You need to create the different sizes of images yourself, and then you pop them in at different breakpoints.
Here is an example I did a while ago:
https://eikweb.com/sharing/fixed-header … index.html

The code for the images will look like this:
<picture><!--[if IE 9]><video style="display: none;"><![endif]-->
<source srcset="./img/SAM_4040-l.jpg" media="(min-width: 64em)">
<source srcset="./img/SAM_4040-m.jpg" media="(min-width: 40em)"><!--[if IE 9]></video><![endif]--><img alt="Placeholder Picture" src="./img/SAM_4040-s.jpg">
</picture>
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 332337 Photo


Registered User
120 posts

Inger,

Thank you - is there a difference between an actual image or a background image being used at different screen sizes?

Also, can the code be generated within SIte Designer? I am avoiding coding by hand if at all possible.

-K
User 122279 Photo


Senior Advisor
14,461 posts

You can use the same technique for background images. SD takes care of the code in both cases, you don't have to worry about that. I only posted the code for you to see, in case you are like me ;) , when I learn a new trick, I always take a look at the code. :) Sorry if that was misunderstood.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 332337 Photo


Registered User
120 posts

I just tried changing the background of a container Div with two different picture sizes - looked like it was keeping the last one I added. Is this just a noodle-to-death issue? I have been tweaking this site for the past two hours. Should I just try again at a later time to see if the two images "stick" in the site like I am intending?

I understand the looking at the code maneuver - I do it as well to verify the site is functioning as designed.

Thank you for your thoughts.
-K
User 187934 Photo


Senior Advisor
20,192 posts

Start below you smallest break point.
Select div.
Go to the Design tab and select background then click on new image. Use your preferred type.
Now move slider to the break point you want to switch at and add a new background for the same element.
You'll see them both listed now at that break point and you can change the order of them by drag and drop on that list if you need to change which one is for that break point.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 332337 Photo


Registered User
120 posts

Eric,

Thank you - easy steps to follow.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.