Image max-width with Lightbox plugin

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
trixs
Posts: 6
Joined: Fri 17. Jul 2015, 11:36

Image max-width with Lightbox plugin

Post by trixs »

Dear All,
I have a question about best way for adapting image width in lighbox plugin.
Shortly, I have a single version of website for mobile and desktop devices. It's use kind of adaptive design with using meta name viewport for better fonts presentation.

Code: Select all

<meta name="viewport" content="initial-scale=0.75, width=device-width">
So if I use lightbox plugin with image preview width with the well suitable for desktop configuration like

Code: Select all

$phpwcms['img_prev_width']    = 538; //max width of the large preview image

or more I got image out of screen on both sides on my smartphone. What the best way to adaptive image width in ligthbox plugin for mobile devices with narrow screens with phpwcms?
For example for my smartphone I need to set

Code: Select all

$phpwcms['img_prev_width']    = 470; //max width of the large preview image
for image being in screen

I understand that it's not very good solution, because of image downscale and loading time.
User avatar
update
Moderator
Posts: 6446
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: Image max-width with Lightbox plugin

Post by update »

It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
trixs
Posts: 6
Joined: Fri 17. Jul 2015, 11:36

Re: Image max-width with Lightbox plugin

Post by trixs »

No I didn't, thank you, I will check
User avatar
Oliver Georgi
Site Admin
Posts: 9791
Joined: Fri 3. Oct 2003, 22:22
Location: Moscow, Russia
Contact:

Re: Image max-width with Lightbox plugin

Post by Oliver Georgi »

FancyBox is responsive
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply