Title: Image optimization does not work. SQL error.
Last modified: April 12, 2023

---

# Image optimization does not work. SQL error.

 *  Resolved [monkeydluffy](https://wordpress.org/support/users/monkeydluffy/)
 * (@monkeydluffy)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/image-optimization-does-not-work-sql-error/)
 * Searched forum for same issue.
    - _Link to site_: [https://cosmicwebdevelopment.com/](https://cosmicwebdevelopment.com/)
    - _Screenshots_ (tried to upload or copy but does not work here)
    - _Instructions to reproduce the issue_:
      1) Go to image optimization settings
      of litespeed2) See that there is 1 image not optimized3) Try and click on “
      Gather image data”4) nothing happens, no error, nothing5) Click on “Destroy
      All Optimization Data”6) See that there are no more optimized images7) Try
      and click on “Gather image data”8) Get error “Failed to create table `img_optm`!
      SQL: `CREATE TABLE IF NOT EXISTS ``wpso_litespeed_img_optm` () DEFAULT CHARACTER
      SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;.Negeer deze melding.”“Failed to
      create table `img_optming`! SQL: `CREATE TABLE IF NOT EXISTS ``wpso_litespeed_img_optming`()
      DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;.”“No new image
      gathered.”
    - _Report number_: **ETXVORUW**
    - _Other Information: _ 
      v5.3.3I wanted to try the troubleshooting steps, but
      I’m afraid I might break it even more.With kind regards and thanks, great 
      plugin!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fimage-optimization-does-not-work-sql-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/image-optimization-does-not-work-sql-error/#post-16650506)
 * please try go to phpMyAdmin -> this site DB , run these 2 queries from below 
   page
 * [https://paste.ubuntu.com/p/nZswXZZZt7/](https://paste.ubuntu.com/p/nZswXZZZt7/)
 * replace the `wp_` to `wpso_` to match your prefix
 * see if these 2 queries give any error or not .
 *  Thread Starter [monkeydluffy](https://wordpress.org/support/users/monkeydluffy/)
 * (@monkeydluffy)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/image-optimization-does-not-work-sql-error/#post-16653169)
 * There were no errors. 
   I only got “MySQL returned an empty result set (0 rows).(
   Query took 0.0075 seconds.)” with both queries.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/image-optimization-does-not-work-sql-error/#post-16653753)
 * okay , if both queries have no error , now please go to image optm page again,
   try to gather/send , see what it shows.
 *  Thread Starter [monkeydluffy](https://wordpress.org/support/users/monkeydluffy/)
 * (@monkeydluffy)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/image-optimization-does-not-work-sql-error/#post-16673457)
 * Hello qtwrk,
 * Before recent update (**5.3.3 **) I went back to the image optimization settings
   and saw that the images were all optimized like before.
 * After recent update (**5.4**) I saw that no images were optimized, but now I 
   could gather all images again and now they are optimized without any problems.
 * So problem solved and this ticket can be closed succesfully.
   Thanks for creating
   the best caching plugin for WordPress.

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

The topic ‘Image optimization does not work. SQL error.’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

## Tags

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

 * 4 replies
 * 2 participants
 * Last reply from: [monkeydluffy](https://wordpress.org/support/users/monkeydluffy/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/image-optimization-does-not-work-sql-error/#post-16673457)
 * Status: resolved