Hi. Can you not use the image sizes in the plugin options?
No, the image size options in your plugin, has no effect on the current/old gallery images.
The WP is over 8 GB of images, that’s why I not want to do regenerate thumbnails.
My current image plugin is “responsive lightbox”, in the SwipeBox view.
A gallery-image is embedded in the source code as follows:
<dl class="gallery-item">
<dt class="gallery-icon landscape">
<a data-rel="lightbox-gallery-2" href="http://xxx.yyy.de/wp-content/uploads/2016/06/image.jpg" title=""><img width="110" height="110" alt="" class="attachment-galleryimagethumb size-galleryimagethumb" src="http://xxx.yyy.de/wp-content/uploads/2016/06/image-110x110.jpg"></a>
</dt></dl>
And in the functions.php i generate the thumbnail:
add_theme_support( 'post-thumbnails' );
# article: Imagegallery Thumbnails
add_image_size( 'galleryimagethumb', 110, 110, true );
That would be cool if there was a way to use the existing gallery images with your plugin.
Yes you need to rebuild your thumbs for existing images. The Ajax re-sizer will take a while but should work for you.
Or you could edit the plugin. See these two lines in photoswipe-masonry.php
$thumb = wp_get_attachment_image_src( $aid , 'photoswipe_thumbnails');
$full = wp_get_attachment_image_src( $aid , 'photoswipe_full');
I hope that helps!
thank you, for your fast answer.
I edit the plugin from,
$thumb = wp_get_attachment_image_src( $aid , 'photoswipe_thumbnails');
to
$thumb = wp_get_attachment_image_src( $aid , 'galleryimagethumb');
that works.
But one big problem is still exist.
A single Image in a old/existing article does not open with this plugin.
I can fix this per hand, if i change the image properties from,
“Link zur: Benutzerdefinierte URL” to “Link zur: Medien-Datei”, and save again. Then the plugin works, but you know, i have 8GB of images and many articles. But change every single image in the articles is not the solution.
Have you an idea?
Thanks
Alex
Usually by default there is no class in these images to trigger the popup in single images. So you need to re-save the page to add the class “.single_photoswipe”.
Do your single images have a class and link to the full image already? If so you might be able to get it working.