Title: [Plugin: File Gallery] Duplicated CSS image classes (fix)
Last modified: August 20, 2016

---

# [Plugin: File Gallery] Duplicated CSS image classes (fix)

 *  Resolved [tallerthanpenguins](https://wordpress.org/support/users/tallerthanpenguins/)
 * (@tallerthanpenguins)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-file-gallery-duplicated-css-image-classes-fix/)
 * Thanks for the plugin work!
 * One issue I found when inserting a number of images is that the image class selectors
   were being duplicated for each image inserted, so we would get results that included
   image class values looking like the following:
    first image: “aligncenter size-
   large wp-image-6397” second image: “aligncenter size-large aligncenter size-large
   wp-image-6398” third image: “aligncenter size-large aligncenter size-large aligncenter
   size-large wp-image-6400” …etc
 * To fix this, I modified line 120 of includes/attachments.php as follows:
    change
   from: $imageclass .= ‘ align’ . $align; to: $imageclass = ‘ align’ . $align;
 * seems to work fine so thought I’d communicate it back.
 * thanks!
 * [http://wordpress.org/extend/plugins/file-gallery/](http://wordpress.org/extend/plugins/file-gallery/)

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

 *  Plugin Author [Aesqe](https://wordpress.org/support/users/aesqe/)
 * (@aesqe)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-file-gallery-duplicated-css-image-classes-fix/#post-2927126)
 * [@tallerthanpenguins](https://wordpress.org/support/users/tallerthanpenguins/):
   thanks for the bug report! 🙂
 * I’ll fix it and release a new version of the plugin tomorrow.
 *  Plugin Author [Aesqe](https://wordpress.org/support/users/aesqe/)
 * (@aesqe)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-file-gallery-duplicated-css-image-classes-fix/#post-2927149)
 * fixed in 1.7.5.3, marking as resolved

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

The topic ‘[Plugin: File Gallery] Duplicated CSS image classes (fix)’ is closed 
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/file-gallery_fdfbfb.svg)
 * [File Gallery](https://wordpress.org/plugins/file-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/file-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/file-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/file-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/file-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/file-gallery/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)

 * 2 replies
 * 2 participants
 * Last reply from: [Aesqe](https://wordpress.org/support/users/aesqe/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-file-gallery-duplicated-css-image-classes-fix/#post-2927149)
 * Status: resolved