Title: Lightbox Strange Behavior
Last modified: September 28, 2022

---

# Lightbox Strange Behavior

 *  Resolved [Frank Gomez](https://wordpress.org/support/users/frank6tg/)
 * (@frank6tg)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/lightbox-strange-behavior/)
 * I noticed recently that the lightbox is loading images inconsistently. Which 
   background (black is specified) images not centered on page etc etc. Works fine
   when signed in. Doesn’t work when logged out.
 * // EDITED Figured it out. Problem was caused by WP Rocket “Removed Unused CSS”
    -  This topic was modified 3 years, 7 months ago by [Frank Gomez](https://wordpress.org/support/users/frank6tg/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Flightbox-strange-behavior%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Arno Welzel](https://wordpress.org/support/users/awelzel/)
 * (@awelzel)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/lightbox-strange-behavior/#post-16051924)
 * This is caused by your CSS rules, you need to fix them. When it works only when
   signed in you also might have some caching problem – content is cached for visitors
   but not for logged in users.
 * As usual with such problems: avoid rules which change elements on a global level(
   except some basic things like the HTML or BODY container to apply “reset” rules
   for consistency) and _always_ use selectors for classes or IDs.
 *  Thread Starter [Frank Gomez](https://wordpress.org/support/users/frank6tg/)
 * (@frank6tg)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/lightbox-strange-behavior/#post-16051940)
 * Yes, you are right, Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Lightbox Strange Behavior’ is closed to new replies.

 * ![](https://ps.w.org/lightbox-photoswipe/assets/icon-256x256.png?rev=2906302)
 * [Lightbox with PhotoSwipe](https://wordpress.org/plugins/lightbox-photoswipe/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/lightbox-photoswipe/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/lightbox-photoswipe/)
 * [Active Topics](https://wordpress.org/support/plugin/lightbox-photoswipe/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lightbox-photoswipe/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lightbox-photoswipe/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Frank Gomez](https://wordpress.org/support/users/frank6tg/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/lightbox-strange-behavior/#post-16051940)
 * Status: resolved