Page 1 of 1

Different gallery with screen size?

Posted: Mon Oct 17, 2016 10:00 am
by SolsWebdesign
Hi All,

I have searched the forum but I can't seem to find an easy answer to this :) So here goes: I would like to load different image sizes or galleries depending on the customer's screen size! This is for a site that should show almost full-size images on big screens and smaller images on handhelds. There are a couple of solutions that I'm thinking of, but I was just wandering, has anybody thought about this before?

The thing is, I do not want to load huge images in a gallery if the customer is viewing with a mobile or handheld, making the site slow and not a nice experience for those customers.

I could do 2 things: either make 2 galleries for all gallery pages (and I have 60+ galleries in this case) and somehow make an UDT to determine which gallery to show depending on the screen size.
Or I could fill all galleries with every image in 2 sizes and then use Rolf's great tutorial from cmscanbesimple (see http://www.cmscanbesimple.org/blog/gett ... -in-smarty to determine what images to show).

Anybody already experienced with this? Or any (other) ideas on this? :)
Isolde

Re: Different gallery with screen size?

Posted: Mon Oct 17, 2016 11:26 am
by velden
You could have a look at CGSmartImage module. It's possible to use it with Gallery and it has built-in detection of mobile devices.

Think the details are in the help.

Re: Different gallery with screen size?

Posted: Mon Oct 17, 2016 11:42 am
by SolsWebdesign
Thank you, Velden, I'll have a look at CGSmartImage and see if I can get that combined with Gallery :)

Re: Different gallery with screen size?

Posted: Mon Oct 17, 2016 11:45 am
by Rolf

Re: Different gallery with screen size?

Posted: Mon Oct 17, 2016 2:04 pm
by SolsWebdesign
Thanks, Rolf, I'll have a look at the PhotoSwipe too. I found that in your tutorial too and it just may be the best solution! :D