Title: Gallery doesn&#8217;t work on mobile
Last modified: May 27, 2024

---

# Gallery doesn’t work on mobile

 *  Resolved [natsshop](https://wordpress.org/support/users/natsshop/)
 * (@natsshop)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/gallery-doesnt-work-on-mobile/)
 * Hi there,
 * the gallery doesn’t work on mobile. The images are completely distributed on 
   the cell phone and the lightbox does not open. The navigations are also spread
   somewhere on the page. I created a test page with just the gallery to get a better
   overview. When I view the page in the browser console in mobile view, it works.
   But not real on the cell phone. Screenshots attached.
   Regards Gisela
 * [https://test.kosmetikstudio-nats.de/wp-content/uploads/2024/05/Screenshot_2024-05-27-16-19-16-689_com.android.chrome-scaled.jpg](https://test.kosmetikstudio-nats.de/wp-content/uploads/2024/05/Screenshot_2024-05-27-16-19-16-689_com.android.chrome-scaled.jpg)
 * [https://test.kosmetikstudio-nats.de/wp-content/uploads/2024/05/Screenshot_2024-05-27-16-53-34-492_com.android.chrome-scaled.jpg](https://test.kosmetikstudio-nats.de/wp-content/uploads/2024/05/Screenshot_2024-05-27-16-53-34-492_com.android.chrome-scaled.jpg)
 * [https://test.kosmetikstudio-nats.de/wp-content/uploads/2024/05/Screenshot_2024-05-27-16-19-42-402_com.android.chrome-scaled.jpg](https://test.kosmetikstudio-nats.de/wp-content/uploads/2024/05/Screenshot_2024-05-27-16-19-42-402_com.android.chrome-scaled.jpg)
 * [https://test.kosmetikstudio-nats.de/wp-content/uploads/2024/05/Screenshot_2024-05-27-16-20-21-219_com.android.chrome-scaled.jpg](https://test.kosmetikstudio-nats.de/wp-content/uploads/2024/05/Screenshot_2024-05-27-16-20-21-219_com.android.chrome-scaled.jpg)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fgallery-doesnt-work-on-mobile%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [natsshop](https://wordpress.org/support/users/natsshop/)
 * (@natsshop)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/gallery-doesnt-work-on-mobile/#post-17783922)
 * Okay, now I have deactivated WP Rocket and the gallery works on mobile devices.
   But which of the many settings in wprocket could be the problem?
 *  Thread Starter [natsshop](https://wordpress.org/support/users/natsshop/)
 * (@natsshop)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/gallery-doesnt-work-on-mobile/#post-17783939)
 * It is the wprocket setting: Enable for CSS background images. Can I change this
   with a setting in foogallery? I would like to leave this area activated on wprocket.
 *  Plugin Support [elviiso](https://wordpress.org/support/users/elviiso/)
 * (@elviiso)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/gallery-doesnt-work-on-mobile/#post-17792248)
 * Hi
 * I have run tests from my end and noticed that the issue you described is no longer
   happening as shown in the mobile screen recording in this link: [https://www.filemail.com/d/ecdvvklknqinkvp](https://www.filemail.com/d/ecdvvklknqinkvp)
 * If the issue stopped happening after you deactivated WP Rocket, then it’s most
   likley becasue of how the FooGallery scripts are being deferred by WP Rocket.
 * As a workaround that may work for you, you can add the FooGallery script URLs
   to WP Rocket’s “Excluded Javascript Files” field and then save changes as explained
   in this guide of theirs: [https://docs.wp-rocket.me/article/976-exclude-files-from-defer-js](https://docs.wp-rocket.me/article/976-exclude-files-from-defer-js)
 * Here are the URLs that you can add:
 *     ```wp-block-code
       /wp-content/plugins/foogallery/extensions/default-templates/shared/js/foogallery.min.js
       ```
   
 * Hope this helps.
 * Kind regards,
   Elvis.
 *  Thread Starter [natsshop](https://wordpress.org/support/users/natsshop/)
 * (@natsshop)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/gallery-doesnt-work-on-mobile/#post-17803079)
 * Hi there,
 * thanks for the help, but unfortunately that’s of no use. If I enter the js file
   in wprocket, it also destroys the gallery. Unfortunately, the lazyload setting
   for css background image has to be deactivated in wprocket, then all galleries
   are visible and work.
 * Regards Gisela

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

The topic ‘Gallery doesn’t work on mobile’ is closed to new replies.

 * ![](https://ps.w.org/foogallery/assets/icon-256x256.gif?rev=2602542)
 * [Gallery by FooGallery](https://wordpress.org/plugins/foogallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/foogallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/foogallery/)
 * [Active Topics](https://wordpress.org/support/plugin/foogallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/foogallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/foogallery/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [natsshop](https://wordpress.org/support/users/natsshop/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/gallery-doesnt-work-on-mobile/#post-17803079)
 * Status: resolved