Tagged: cellphone
-
AuthorPosts
-
September 11, 2017 at 10:18 am #850401
is there any way to adjust the lighbox image size for mobile devices
we have about 20.000 images in our galleries on dumaguete.com . most have 1024 px width.
While all works nice with lightbox on PC, and are full width when the mobile is held normal, the pictures appear very small on a cellphone with a big black frame around it, when rotated in horizontal position, or for that case also is the website is opened holding the cell horizontal.
please advice.
thanks RhoodySeptember 11, 2017 at 3:14 pm #850535Hey Rhoody,
I have checked one of your gallery pages and it looks good on my end, and the image stretch in full width and the height adjusts to the the width of the image. Can you post a screenshot on how it looks on your end? so we can check.
Best regards,
NikkoSeptember 11, 2017 at 11:36 pm #850709on pc or tablet it is all fine
I talk about lightbox on cellphones.
having the phone horizontal the images are small and don’t adjust with the big gray lightbox frame around.
on a 5 inch display, the picture width is less than 3 inch.below a screenshot
https://dumaguete.com/wp-content/uploads/2017/09/cell-horizontal-ss.jpgSeptember 13, 2017 at 5:16 am #851343Hi,
Thank you for the update.
You can use the following css code to increase the image container a bit.
.mfp-img { padding: 5px 0 5px; }
Best regards,
IsmaelSeptember 13, 2017 at 5:39 am #851353thanks for your reply.
look at the screenshot
https://dumaguete.com/wp-content/uploads/2017/09/Screenshot-Sep-13-2017-11_31_38-AM.jpg
still 3/4 of the phone-display is grey frame and only 1/4 the image
cheersSeptember 13, 2017 at 7:59 am #851420Hi,
Did you remove the browser cache after adding the code? What is the actual model of your device?
Screenshot from iPhone 6 plus emulation: https://imgur.com/a/CJ7XH
Best regards,
IsmaelSeptember 13, 2017 at 8:45 am #851440Hi thanks for your answer.
I have a Samsung J5 here.
your screenshot is how it looks when I hold the phone in normal (vertical) position. if I rotate it to horizontal, the image remains the same size )does not adjust to the wide screensize, leaving the big frame around like in my previous screenshot.
so I guess there is not much to do aboutSeptember 13, 2017 at 4:36 pm #851651Hi Rhoody,
It adjusts ok on the iPhone. Screenshots in private.
Best regards,
VictoriaMay 26, 2018 at 7:59 am #962520We have the same problem on our page. Even when you start the gallery lightbox in horizontal mode the image remains small. Tested it on iPhone 4, 5 and 7 as well as on Samsung and Huawei devices.
Any solutions so far?
Example galleries:
May 29, 2018 at 5:05 am #963496Hi DJarr,
As far as I could see on your site, the images occupy 100% of the screen width and it would not be possible to show them larger without users having to scroll to be able to view the entire image. If I have misunderstood you then please post a screenshot of the problem and try to explain a bit further.
Best regards,
RikardMay 29, 2018 at 9:09 pm #963939We used to have a similar problem before on every other screen than mobile phones. Using this code we scaled it to 110% and the issue was solved:
img.mfp-img {
max-width: 110% !important;
width: 110%;
}
Unfortunately this never worked for mobile screens. The images are very small, making the lightbox feature on mobile device almost useless (they are not larger than the images already displayed).How can I provide a screenshot in this Forum?
May 31, 2018 at 7:09 am #964643Hi,
You can upload the screenshot on imgur or dropbox and post it here.
Best regards,
IsmaelMay 31, 2018 at 10:27 am #964713June 1, 2018 at 12:41 pm #965270Hi,
Thanks for the update. What is the actual model of the device? I can’t seem to find the images described in the screenshot. Please note the lightbox script relies on the height of the image because the whole image has to be visible inside the view port container. If you want to test it, just add this css code.
img.mfp-img { max-height: 200vh !important; }
The height of the image is going to be twice the height of the viewport. The width is already set to “auto” so it’s going to adjust accordingly.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.