---
title: "[Deprecated] Using the FooBox Lightbox plugin instead of the default Thickbox"
date: 2026-04-23
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravityview/customizing-your-views/using-the-foobox-lightbox-plugin-instead-of-the-default/"
---

**This article is outdated and no longer applies to current GravityView.** Since GravityView 2.10, the built-in lightbox uses Fancybox, and it is the supported option. The FooBox method below, and community snippets that swap in a different lightbox script (such as Featherlight), are not compatible with current GravityView. To change how the lightbox looks, style the built-in lightbox with CSS. In GravityView 3.0 and newer you can scope that CSS to GravityView's lightbox with the `.gv-lightbox` class, for example `.gv-lightbox .fancybox__content { ... }`.

Before version 2.10, GravityView used the WordPress-included [Thickbox](http://codex.wordpress.org/ThickBox) plugin to generate the lightbox for images and PDFs.

You may want to use a different lightbox solution. If you use the [FooBox Image Lightbox](https://wordpress.org/plugins/foobox-image-lightbox/) plugin, this is how you can override the GravityView lightbox to use the FooBox lightbox instead:

Paste the following code into your theme's functions.php file ([see how](https://www.gravitykit.com/docs/gravityview/customizing-your-views/where-to-put-code-samples/)):

```
// GravityView: Override the default lightbox by FooBox
add_filter( 'gravityview/fields/fileupload/link_atts', 'my_gv_image_link_atts', 10, 2 );
function my_gv_image_link_atts( $link_atts, $field ) { 	
    $link_atts['class'] = 'foobox';
    return $link_atts;
}
```

```
// GravityView: Override the default lightbox by FooBox
add_filter( 'gravityview/fields/fileupload/link_atts', 'my_gv_image_link_atts', 10, 2 );
function my_gv_image_link_atts( $link_atts, $field ) { 	
    $link_atts['class'] = 'foobox';
    return $link_atts;
}
```

And there you go: images will now be using Foobox instead of the GravityView (and WordPress) default!