-
AuthorPosts
-
January 6, 2016 at 11:09 am #560401
Hi
the images in the lightbox are too small on big screens (should be the original size, if the screen is bigger).
Example: the image size in the lightbox is 1030 x 734 pixels on a screen with 2560 x 1440 pixels.
The original image size is 1920 x 1200 pixels.Is there a possibility, to change the parameters of the lightbox, and where can I do that?
Thanks
January 6, 2016 at 2:55 pm #560543Hey webmanu!
Please try adding following code to Functions.php file in Appearance > Editor
add_filter( 'avf_avia_builder_masonry_lightbox_img_size', 'enfold_customization_change_popup_size' ); function enfold_customization_change_popup_size( $size ) { return 'fullsize'; }
Cheers!
YigitJanuary 6, 2016 at 5:48 pm #560668Thanks Yigit!
January 6, 2016 at 5:55 pm #560675Hi!
glad Yigit could help. Let us know in a new ticket if you have some more questions related to the theme. We are happy to assist you.
Regards,
AndySeptember 2, 2016 at 8:17 pm #681458I’ve added that code…and it just isn’t working. I have just the basic gallery setup and the lightbox images are still showing smaller. But if I just use html to display an lightboxed image link, it takes up the whole screen…and all the images are the same size. I have no other code in my functions that messes with anything that has to do with Enfold, images and lightbox. No plugins that would.
EDIT – I found the issue….it isn’t linking to the fullsize image using the gallery widget in the site builder. It still links to the large size…1030px. Even with that code in use. Does that code need updating to reflect any changes made in recent releases?
- This reply was modified 8 years, 3 months ago by Kahil.
September 6, 2016 at 2:42 pm #682659Hi,
@Kahil can you please start a thread and attach a link to your page and temporary admin logins in private content field?
If you post them here, they will be visible to the OP as well.Best regards,
YigitSeptember 21, 2021 at 3:06 pm #1321784Hi,
I’ve tried the code but it doesn’t seem to work. I would like the images in the light box to always be loaded at the maximum size. I’d love to hear what I need to do to make this possible.
Kind regards,
Jarno Beelen
September 25, 2021 at 10:13 pm #1322305Hi,
@Media-click sorry for the very late reply, typically the lightbox opens at the maximum size for the screen while also allowing for the padding of the top close button and the bottom info bar. The lightbox is not meant to extend the viewable space nor to be absolute full screen because the space around the lightbox is used as a clickable space to close the lightbox.
So your lightbox should be like this:
You can use custom css to override this, for example:img.mfp-img { width: 1200px !important; max-width: 1200px !important; height: 1976px !important; max-height: 1976px !important; }
but doing this may interfere with being able to use the close button or clicking to the side to close the lightbox, and may require scrolling.
If this is not what you meant then please open a new thread so we can see a link to your site, as this is not your thread you will not see our comments in the Private Content area, if needed. This thread is from 2016 and it is always better to open new threads.Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.