Overwrite size of image displayed in gallery lightbox
-
Hi, is there a way to overwrite the size of the image displayed in the lightbox via the admin tools? I have discovered the code for this is within the functions.php in a function called mb_gallery_shortcode. The exact line of code is:
$full_image_src = wp_get_attachment_image_src( $id, 'full' );
Where ‘full’ can be changed to either a thumbnail, medium, large or full or a 2-item array representing width and height in pixels, e.g. array(32,32) – WordPress function reference
I have fiddled with this and setting ‘large’ would be optimal for the images my users are uploading. I am reluctant to change the functions.php file and a child theme is not an option at this stage. I have created a theme-options-extended.php which I include in the original theme-options.php file. Unfortunately, this is loaded at the top of the functions.php page and therefore, my ‘remove_filter’ call does not work. Any other thoughts?
- The topic ‘Overwrite size of image displayed in gallery lightbox’ is closed to new replies.