Ready to get started?Download WordPress

Plugin Directory

Document Gallery

This plugin generates thumbnails for documents and displays them in a gallery-like format for easy sharing.

Features For The Future



  • Enhancement: Ghostscript detection should now work correctly on GoDaddy and some other hosts that don't properly setup their executables.
  • Translation: Thanks again to demur who has translated Document Gallery into Russian and Ukrainian! If you would like to help translate Document Gallery into another language, get started here!


  • Bug Fix: The order attribute was documented and implemented as being ASC or DEC, but the latter should actually have been DESC. Documentation and implementation for this option has been corrected. Thanks again to demur for catching this!


  • Enhancement: Ghostscript will now handle PS and EPS files if enabled.
  • Bug Fix: There were a couple of issues in how the ids attribute was being handled. Thanks, demur for catching these!


  • Bug Fix: 2.0.6 did not fully resolve the bug described below. This should.


  • Bug Fix: If DG failed to automagically detect the location of the Ghostscript binary, manually setting the location did not enable using it. Thanks for tracking this bug down, Chris!
  • Minor: Included various enhancements in handling thumbnail generation for image types.
  • Tested Up To: Document Gallery has been tested in WP 3.9 (RC 1).


  • Bug Fix: Rolling back part of CSS enhancments in 2.0.4 that were causing errors on some servers. May revisit at a later date.


  • Enhancement: Custom CSS is now loaded faster, meaning faster page loads for your users. Tests are showing a speedup of around 30% over where it was in the last release.
  • Enhancement: All of the default icons were sent through Yahoo! Smush.it, giving a few percentage points decrease in size. Thanks for the suggestion, wm!


  • Enhancement: Now handles custom user CSS more securely.
  • Enhancement: Now handles calling Ghostscript executable more securely.
  • Enhancement: Now provides timing information for gallery generation when running WordPress in WP_DEBUG mode. When enabled, DG will log to the PHP error log file.
  • Info: Did you know that in tests I performed, Ghostscript (GS) performed 350% faster than using Imagick (IM)? Try testing with this file, which finished almost instantly using GS, but took multiple minutes when using IM on my test server (results may vary). See new FAQ tab to find out why.


  • Bug Fix: Imagick was actually never working... My bad -- it is now! Thanks to kaldimar for reporting this.
  • Enhancement: Document Gallery en el EspaƱol por Andrew de WebHostingHub. (To help translate to another language, see here.)


  • Bug Fix: Resolves issue with 2.0 where DG options were not properly initialized when the plugin was updated. This caused the settings page to behave oddly and many other things throughout to not work as expected when you updated through the dashboard. Thanks to jawhite & rigbypa for reporting this!


  • Enhancement: This release is a BIG deal! We are introducing true document thumbnails (rather than the boring static images that were the same for every document), meaning that you will be able to generate and display thumbnails for most of your documents so your users can see a preview of the document before downloading. This has been months in development and I really hope that you all enjoy it!
  • Enhancement: Document Gallery now has a settings page where you can configure the default options for your galleries and chose how thumbnails are generated.
  • Enhancement: Customizing CSS for your document gallery is now much easier. If you want to add additional styling, just navigate to Settings -> Document Gallery in your dashboard and enter valid CSS in the "Custom CSS" textbox. See the changes instantly in your galleries!
  • Enhancement: Entire plugin is now Internationalization-enabled. This means that we can now support users speaking all languages. If you are interested in translating Document Gallery into a language that you speak, please let me know!
  • Enhancement: This release saw much of the backend refactored to better support future development. Nothing you will notice unless you're digging into the code, but it will keep me sane long-term ;)
  • Note: The thumbnail generation implementation works very hard to support all hosting servers (including Unix and Windows systems). That said, I cannot test on all hosts out there, so there is the potential for bugs to appear. If you notice something that doesn't look right, please don't hesitate to report the issue so that I can resolve it. Thanks!


  • Bug Fix: Resolves minor bug introduced in version 1.4.2. Thanks, tkokholm!


  • Note: This release includes an increase in the minimum WP version to 3.5. If you have not yet upgraded to at least this version, you should consider doing so as future releases include a number of fantastic new features as well as many security improvements. If you chose not to upgrade, you must stay with Document Gallery 1.4.1 or lower until you do. Sorry for the inconvenience!
  • Bug Fix: Resolved icons being displayed differently depending on which user was currently logged in. (Thanks to Sean for reporting the issue.)
  • Enhancement: A number of new icons were added (mainly for the iWork suite and source code filetypes) and a number of pre-existing icons were removed if they were very similar to another icon.
  • Under The Hood: Many, many cool things. Stay tuned for a big reveal in the coming weeks! PS: If you're really curious, there are some clues in the source code ;)


  • Bug Fix: This resolves a bug introduced in 1.4, which caused a warning to be thrown when no attributes were used (i.e.: [dg]). (Thanks to wtfbingo for pointing this out!)


  • New Feature: This release features the addition of category/taxonomy support, as suggested by Pyo.
  • Under The Hood: The plugin was completely rewritten for this release. Logic was cleaned up to make maintenance easier and facilitate some big changes planned for version 2.0 of Document Gallery.


  • Bug Fix: This resolves a bug introduced in version 1.3. (Thanks to JKChad for pointing this out!)


  • New Feature: It is now possible to filter the HTML produced to represent each individual icon, making it possible to add extra attributes and other modifications on the fly as document icons are generated. This will probably only be of use to developers and people who don't mind getting their hands dirty. (See bottom Installation tab for more details.)
  • Enhancement: There have been a lot of optimizations to the underlying plugin code to make it run more efficiently and be easier to read, if you are so inclined.
  • Enhancement: Changed how images, when included within the gallery, are generated so that the format of the icon returned now matches the rest of the icons.


  • Bug Fix: Resolved issue with the ids attribute in 1.2 not working. Sorry about that!


  • New Feature: Images can now be included alongside documents in a document gallery (using images=true attribute). (Thanks for the suggestion, Luca!)
  • New Feature: Attachment ids can now be explicitly listed, allowing for documents not attached to a post or page to be included in a document gallery (e.g.: ids=2,42,57,1). Note that no spaces should be included.
  • Enhancement: The CSS stylesheet has been enhanced for more flexibility in sizing icons.


  • New Feature: Included option to link to the attachment page as well as to the actual document.
  • Enhancement: Added documentation for customizing the appearance of the plugin.
  • Enhancement: Many improvements to the backend, including pretty HTML output and best practice implementation in calls to WordPress core functions.


  • Bug Fix: Removed extra div at bottom when number of documents is evenly divisible by 4. (Thanks, joero4ri!)


  • Bug Fix: Resolved issue with detecting plugin directory. (Thanks, Brigitte!)
  • Enhancement: Minor improvement to how linking to individual documents is handled.


  • Bug Fix: Merge for changes in 1.0 did not go through correctly so users downloaded the old icon set which broke the plugin. Sorry about that, but all is resolved with this release!


  • Bug Fix: Resolved issue with long document titles being cut off in some themes.


  • New Feature: Plugin now has 36 icons representing 72 filetypes!
  • Enhancement: Optimized gallery generation (faster!)
  • Enhancement: Added fallback to WordPress default icons if you happen to include one of the few filetypes not yet supported.
  • Enhancement: Changed shortcode to [dg] ([document gallery] will still work for backward compatibility).
  • Enhancement: Gave documentation some much needed revisions.



  • Release: First public release of Document Gallery.
  • Feature: Displays PDF, Word, PowerPoint, Excel, and ZIP documents from a given page or post.
  • Feature: Documents can be ordered by a number of different factors.

Requires: 3.6 or higher
Compatible up to: 3.9.2
Last Updated: 2014-6-4
Downloads: 31,507


4 stars
4.9 out of 5 stars


7 of 15 support threads in the last two months have been resolved.

Got something to say? Need help?


Not enough data

1 person says it works.
0 people say it's broken.

100,1,1 100,2,2
0,1,0 100,1,1 100,1,1 100,1,1 100,1,1 0,1,0 100,1,1
100,1,1 0,1,0 80,5,4
100,1,1 100,1,1 100,1,1
100,1,1 100,1,1
100,1,1 100,2,2
100,1,1 50,2,1 100,2,2 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
100,2,2 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
100,2,2 100,1,1 100,1,1 100,1,1