arnowelzel / lightbox-photoswipe

Integration of PhotoSwipe to WordPress
https://arnowelzel.de/wp/en/projects/wordpress/lightbox-with-photoswipe
GNU General Public License v2.0
27 stars 7 forks source link

Not working with Soil plugin from Roots #56

Closed huub-l closed 4 years ago

huub-l commented 4 years ago

Hi,

Somehow your plugin doesn't work when the relative urls module from the plugin Soil is enabled: https://github.com/roots/soil/blob/master/modules/relative-urls.php

I can't locate the problem, any idea?

arnowelzel commented 4 years ago

Relative URLs are not supported. I can try to fix this for future versions. The problem is the call back handler for the output filter which expects a complete URL and won't recognize something like /wp-content/uploads/2020/08/someimage.jpg as URL (because in fact it isn't).

But a note about this: changing all URLs to be relative usually makes no sense. For a search engine it makes no difference and even if you have 100 images in a page and your domain name including "https://" in the beginning is 20 characters long this only adds about 2 KB of data to the page.

In fact using relative URLs may even be bad for SEO. See here: https://moz.com/blog/relative-vs-absolute-urls-whiteboard-friday

arnowelzel commented 4 years ago

Fixed with 8bffafc41656cf633ff06e8e844349d57d053cb5