Query params break lightbox
-
Hi,
If the URL for the image contains a query param i.e. ?swcfpc=1 then the lightbox doesn’t work as your filter code expects the URL to end with the file extension.
Our cache busting plugin adds this to our URLs for all in-page stuff so we need it to work when query params are at the end of the media item URL.
i.e.
filter:/.+\.(gif|jpe?g|png|webp|svg|avif|heif|heic|tif?f|)$/i;
should be something more like this, obviously this might pass the test if a domain contains any of those combination of character after a fullstop, so might need to be a bit smarter.
filter:/.+\.(gif|jpe?g|png|webp|svg|avif|heif|heic|tif?f|)/i;
Thanks!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Query params break lightbox’ is closed to new replies.