Tagged: Lightbox
-
AuthorPosts
-
July 23, 2014 at 9:01 pm #295108
Hey guys
Thanks for the last update; Lightbox is great!
Well, almost. It seems to default to a smaller image size than I have uploaded. Can the code be changed to diplay the native size of the image upon Lightbox load?
I need to display 120px wide images but it certainly doesn’t show them that big at the moment.
Cheers guys – keep up the good work.
Regards
EdJuly 23, 2014 at 9:14 pm #295118Hi Ed,
Can you post the link to your website please?
Regards,
JosueJuly 23, 2014 at 9:29 pm #295134Sure, try this:
http://www.swarez.co.ukTry this page and load the Lightbox: Gallery of Purchased Art
The picture with the sculptured heads looking forward is 1210px x 992px. However when you click to load the Lightbox I get a smaller version (i.e. it doesn’t meet the edge of my 1210px layout). File is called ‘Spirit of the Dance’ and looks like this: http://www.swarez.co.uk/images10/Untitled-2.jpg
Thanks
EdJuly 23, 2014 at 9:59 pm #295143Hi Ed!
Have you tried regenerating the thumbnails?
http://wordpress.org/plugins/regenerate-thumbnails/Regards,
JosueJuly 23, 2014 at 10:09 pm #295148Hi Josue
I just regenerated that image alone – now it’s replaced the original file with the 1030x844px version!!! All others remain the original ones. Now I am worried that if I regenerate all images I will get smaller versions defaulting into the lIghtbox which is the opposite of what I want.
I used to have a code fix that allowed me to change the JS file to tell the Lightbox to display the native image and get rid of the need to use the 1030px version.
Can that be located please? Is that the solution?
Your help is appreciated.
regards
EdJuly 23, 2014 at 10:23 pm #295154Hey!
Try adding this at the very end of your theme / child theme functions.php file:
function change_imgsize() { global $avia_config; $avia_config['imgSize']['entry_without_sidebar'] = array('width'=>1600, 'height'=>1600 ); } add_action( 'init', 'change_imgsize', 1000);
Cheers!
JosueJuly 23, 2014 at 10:50 pm #295173Hi Josue
Doesn’t work I’m afraid. Added to functions.php in child theme and nothing. Removed and added to functions.php instead in the main them and it breaks the site.
Any other ideas?
Thanks Ed
July 23, 2014 at 10:55 pm #295177Hi Ed,
Did you regenerate the thumbnails after adding that?
Regards,
JosueJuly 23, 2014 at 11:00 pm #295179Hi Josue
Yes I did a regenerate on that file plus a few new ones on a new Portfolio item that has done the same thing – defaulted to 1033px version not the 1210px original version.
Regenerated and flushed but no change in Child-Theme functions.php.
Sorry man
regards
EdJuly 23, 2014 at 11:02 pm #295180Hi Ed,
Can you please create me an administrator account? post it here as a private reply.
Regards,
JosueJuly 23, 2014 at 11:04 pm #295182I am looking all over the site in detail now and there are plenty of over-sized images but NONE will go bigger than 1033px so it seems. Is there a parameter or event handler that defines the maximum width of a displayed image in Lightbox?
Just a thought if it helps…
Cheers
EdJuly 23, 2014 at 11:25 pm #295191This reply has been marked as private.July 24, 2014 at 1:13 am #295215Fixed:
http://www.swarez.co.uk/gallery-commissioned-purchased-art/Added this to child functions.php:
function change_masonry_gallery_imgsize() { return "full"; } add_filter('avf_avia_builder_masonry_lightbox_img_size', 'change_masonry_gallery_imgsize');
July 24, 2014 at 1:33 am #295222Thanks Josue
I have checked a few random images and they look fine; just a pity some have defaulted to only loading the 1030px versions – guess that one will remain a mystery.
Thanks for your help
Regards
EdJuly 24, 2014 at 1:37 am #295223I made a quick check and all images from the masonry are apparently linking to their full versions as expected, but perhaps its something related to the caching plugin you have activated.
Cheers!
JosueJuly 24, 2014 at 2:15 am #295228Thankyou… That is correct for Masonry but the problem remains on Galleries.
This is not linking to the full version: http://www.swarez.co.uk/wp-content/uploads/2014/07/Black-painted-horizontal-lines.jpg – it links to: http://www.swarez.co.uk/wp-content/uploads/2014/07/Black-painted-horizontal-lines-1030×686.jpg and is on this page: http://www.swarez.co.uk/modern-art-paintings-for-sale/paper-plane/
Cache flushed and cleared.
Is this the same issue?
Cheers
EdJuly 24, 2014 at 2:47 am #295230Hi Ed!
Check it now:
http://www.swarez.co.uk/modern-art-paintings-for-sale/paper-plane/Added this to child functions.php:
function avia_change_gallery_thumbnail_link($link, $attachment, $atts, $meta) { $link = wp_get_attachment_image_src($attachment->ID, "full"); return $link; } add_filter('avf_avia_builder_gallery_image_link', 'avia_change_gallery_thumbnail_link', 10, 4);
Cheers!
JosueJuly 24, 2014 at 8:24 am #295305Hi Josue
My hero! Thank you so very much!
You saved the day again!
Huge thanks to you my friend.
Best wishes
EdJuly 24, 2014 at 8:26 am #295309You are welcome Ed, your work is awesome :)
Regards,
JosueJuly 24, 2014 at 8:53 am #295317Wow! Thanks man; that’s a very cool thing to say! Although I seem to spend more time with my site that I do painting!
But grateful for the feedback Josue, thankyou…
-
AuthorPosts
- The topic ‘Lightbox Image Size’ is closed to new replies.