Title: Doesn&#039;t support WPML
Last modified: August 30, 2016

---

# Doesn't support WPML

 *  Resolved [Richard K](https://wordpress.org/support/users/rkorebrits/)
 * (@rkorebrits)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/doesnt-support-wpml/)
 * [https://wpml.org/documentation/getting-started-guide/media-translation/](https://wpml.org/documentation/getting-started-guide/media-translation/)
 * The plugin doesn’t check for unique file names when “Compress all images” is 
   used. The same image is compressed several times, exponentially growing the cost
   for compressing images.
 * > [View post on imgur.com](https://imgur.com/1cSkyxe)
 * Generally if a WP plugin lacks functionality I just ignore it and look for another,
   but as this is a paid service (for us), these things should function a little
   better/smarter.
 * [https://wordpress.org/plugins/tiny-compress-images/](https://wordpress.org/plugins/tiny-compress-images/)

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

 *  Plugin Author [TinyPNG](https://wordpress.org/support/users/tinypng/)
 * (@tinypng)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/doesnt-support-wpml/#post-6852350)
 * Hi Richard,
 * It is always tricky when multiple plugins are modifying the functionality of 
   WordPress. We cannot test every combination of plugins, and unfortunately the
   WPML plugin is not one that we have tested yet together with our TinyPNG/TinyJPG
   plugin.
 * We will see if we can test and support it with a future version of our plugin.
 *  Thread Starter [Richard K](https://wordpress.org/support/users/rkorebrits/)
 * (@rkorebrits)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/doesnt-support-wpml/#post-6852495)
 * Thanks. It’s not just necessarily WPML, but just the fact that exact duplicate
   images are listed. Surely it can’t be that hard to filter this?
 *  Thread Starter [Richard K](https://wordpress.org/support/users/rkorebrits/)
 * (@rkorebrits)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/doesnt-support-wpml/#post-6852497)
 * Replace count query
 *     ```
       SELECT COUNT(*) AS<code>count</code>
               FROM $wpdb->posts
              WHERE post_type = 'attachment'
                AND post_mime_type LIKE 'image/%'
           ORDER BY ID DESC
       ```
   
 * by
 *     ```
       SELECT *
               FROM $wpdb->posts
              WHERE post_type = 'attachment'
                AND post_mime_type LIKE 'image/%'
           GROUP BY guid
       ```
   
 * in `bulk_compress_page` to fix the count
 * and for the actual items, replace
 *     ```
       SELECT ID, post_title
           FROM $wpdb->posts
          WHERE post_type = 'attachment'
            AND post_mime_type LIKE 'image/%' $cond
       ORDER BY ID DESC
       ```
   
 * by
 *     ```
       SELECT ID, post_title
           FROM $wpdb->posts
          WHERE post_type = 'attachment'
            AND post_mime_type LIKE 'image/%' $cond
       GROUP BY GUID
       ORDER BY ID DESC
       ```
   
 * **Edit**
 * `COUNT` of course doesn’t work with the group by statement :facepalm:, but at
   least the actual query will remove duplicates.
 *  Plugin Author [TinyPNG](https://wordpress.org/support/users/tinypng/)
 * (@tinypng)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/doesnt-support-wpml/#post-6852514)
 * Ordinarily there should be no way for images to be duplicated in WordPress. WordPress
   assumes you upload an image once, and then attach it to multiple posts. WPML 
   changes that assumption. That’s one of the challenges of developing extensions
   for WordPress. Plugins can change how WordPress behaves and do whatever they 
   want.
 * The actual file name is stored in the post metadata, in `_wp_attached_file`. 
   In principle it might be possible to filter out duplicates this way. Using the
   GUID is not a great solution because there’s no guarantee this field is identical
   if the image is duplicated. In fact, it is supposed to be globally unique.
 * It certainly is possible, but it’s slightly more tricky than it may seem. And
   WPML is not an open source plugin, so it is very difficult for us to test. Nevertheless
   I have added the suggestion to our list!

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

The topic ‘Doesn't support WPML’ is closed to new replies.

 * ![](https://ps.w.org/tiny-compress-images/assets/icon-256x256.png?rev=3448487)
 * [TinyPNG - JPEG, PNG & WebP image compression](https://wordpress.org/plugins/tiny-compress-images/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tiny-compress-images/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tiny-compress-images/)
 * [Active Topics](https://wordpress.org/support/plugin/tiny-compress-images/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tiny-compress-images/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tiny-compress-images/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [TinyPNG](https://wordpress.org/support/users/tinypng/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/doesnt-support-wpml/#post-6852514)
 * Status: resolved