Title: Affecting Gallery Display
Last modified: August 24, 2016

---

# Affecting Gallery Display

 *  Resolved [pinkylips](https://wordpress.org/support/users/pinkylips/)
 * (@pinkylips)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/affecting-gallery-display/)
 * Hi there, the plugin works great except it affects displaying gallery (wordpress).
   The grey boxes show up instead of the images.
    Any solution please? Thanks
 * [https://wordpress.org/plugins/vanilla-pdf-embed/](https://wordpress.org/plugins/vanilla-pdf-embed/)

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

 *  Plugin Author [Mike Doherty](https://wordpress.org/support/users/_doherty/)
 * (@_doherty)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/affecting-gallery-display/#post-5990832)
 * Which gallery are you talking about? Please provide a link to an example that
   shows the error you’re referring to.
 *  [Statistiker](https://wordpress.org/support/users/statistiker/)
 * (@statistiker)
 * [11 years ago](https://wordpress.org/support/topic/affecting-gallery-display/#post-5990986)
 * Hi Mike,
 * unfortunately, I have the same problem with standard wordpress galleries. Can
   you already provide a fix for this bug? Gallery images are either not visible
   or the stylesheet is changed.
 * Thanks for your efforts!
 *  [Statistiker](https://wordpress.org/support/users/statistiker/)
 * (@statistiker)
 * [11 years ago](https://wordpress.org/support/topic/affecting-gallery-display/#post-5990987)
 * Finally, I can tell you what is wrong with your plugin:
 * In my case, I have a rather large blog, with different authors. On the one hand,
   they can all upload files and on the other hand, I have no time to check every
   mime type. Actually, some people managed to create a jpg-file with a pdf mime
   type which is not filtered out by
 *  if ( $wp_post->post_type != ‘attachment’ || $wp_post->post_mime_type != ‘application/
   pdf’) {
 * Therefore, I had to insert an additional condition
 * $pos = strpos($src, ‘.pdf’);
    if ($pos === false) return;
 * In order to check, whether .pdf is part of the filename. Otherwise I will exit
   the function without adding the <object> tags, which crashed the WP galleries.
 * Now I think my problem (and that of pinkylips) is solved, but from a good plugin
   I would have expected a better support instead of not responding.
 *  [Statistiker](https://wordpress.org/support/users/statistiker/)
 * (@statistiker)
 * [11 years ago](https://wordpress.org/support/topic/affecting-gallery-display/#post-5990988)
 * By the way, your problem was already reportet 1 year ago:
 * [https://wordpress.org/support/topic/false-positive-on-jpgs-in-gallery](https://wordpress.org/support/topic/false-positive-on-jpgs-in-gallery)
 *  Plugin Author [Mike Doherty](https://wordpress.org/support/users/_doherty/)
 * (@_doherty)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/affecting-gallery-display/#post-5990989)
 * The file extension is not a reliable indicator of file type. Set the MIME type
   properly on your uploads.

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

The topic ‘Affecting Gallery Display’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/vanilla-pdf-embed.svg)
 * [Vanilla PDF Embed](https://wordpress.org/plugins/vanilla-pdf-embed/)
 * [Support Threads](https://wordpress.org/support/plugin/vanilla-pdf-embed/)
 * [Active Topics](https://wordpress.org/support/plugin/vanilla-pdf-embed/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/vanilla-pdf-embed/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/vanilla-pdf-embed/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Mike Doherty](https://wordpress.org/support/users/_doherty/)
 * Last activity: [10 years, 12 months ago](https://wordpress.org/support/topic/affecting-gallery-display/#post-5990989)
 * Status: resolved