Developer forum

Forum » Rapido » Pictures on mobile

Pictures on mobile

Gerard Kocks
Gerard Kocks
Reply

Hi,

On https://www.holland-controls.com/services (and also on other pages on this site) we added a picture (see attachements).
On mobile picture is smaller, but also not centrated so it does not look that nice I think.

Can I solve this myself?

Best regards
Gerard

Opslaan.png Picture_in_CMS.png Picture_on_mobile.jpg

Replies

 
Karsten Thuen Dynamicweb Employee
Karsten Thuen
Reply

Hi Gerard

The reason for this is that we try, intelligently, to download as little data as possible needed on each device size. Therefore on mobile we only get small images. But I agree, this is too radical. And in later versions of Rapido we load images a little larger.

To fix it the way we have recently done it on Rapido, go to Templates/Designs/Rapido/Paragraph/ParagraphRender.cshtml 
Scroll to the bottom. And start by removing the "/2" from the smallImage line. Then scoll a little up, and locate the imageWidth and imageHeight variables, and change them to this:

int imageWidth = Int32.Parse(item.GetList("Width").SelectedValue) < 8 ? 620 : 1240;
int imageHeight = Int32.Parse(item.GetList("Width").SelectedValue) < 8  ? 496 : 950;

I am sorry that this is needed. The only other solution I think may be possible, is if you try configuring the image to fill the background, and the try some different settings for the paragraph container. But I am not sure that will work.

 

Best regards
Karsten Thuen

 
Gerard Kocks
Gerard Kocks
Reply

Hi Karsten,

It seems a little tricky indeed. What will happen if we do this and then update the version.
Will it be overwritten by old settings?

And, as this solution is running on 9.4.10, will it be better in 9.4.17?
Are will it be improved in the roadmap? I ask because this is nog an urgent problem for us.

Best regards
Gerard

 
Karsten Thuen Dynamicweb Employee
Karsten Thuen
Reply

Hi Gerard

This is Rapido, so updating Dynamicweb will not change anything. If you update Rapido after making these custom changes, then yes, they will be overridden. But a similar fix also exist in the latest Rapido.

 

Best regards
Karsten Thuen

 
Gerard Kocks
Gerard Kocks
Reply

Hi Karsten,

We will update the Rapido's. Thanks for your reply!

Best regards
Gerard

 

You must be logged in to post in the forum