View Categories

SPIO 5 tells me to convert/migrate legacy data, what is this?

ShortPixel Image Optimizer (SPIO) version 5 and above has a new way of storing the optimization information that prevents other plugins from removing it accidentally (which in most cases results in the same image(s) being optimized again).

Here is a more detailed explanation:

  • SPIO version 4 and older stores the ShortPixel optimization information directly in the postmeta table, within the attachment information, along with other details like the thumbnail list for each image, the file format, and so on.
  • Because of this way of storing the information, and because other plugins work with this attachment metadata by simply regenerating it without checking for custom information (like ours), we decided to move the optimization information out of the postmeta table and store it in a custom table called shortpixel_postmeta .
  • The conversion/migration of the legacy data does not touch the actual image files (so no rewriting, re-optimization, or similar issues), it just copies the ShortPixel optimization information from the postmeta database table to our custom table shortpixel_postmeta. The information is not removed from the postmeta table unless you do it from the Tools tab in the Settings screen (the Remove Legacy Data option).
  • Although this process should be simple and straightforward, in our experience, it might fail in very specific situations. Considering the fact that hundreds of thousands of websites use our plugin, we strongly recommend that you make a full backup of your website before migrating you can easily restore in case something goes wrong.
  • There is no major problem if the conversion is not done, but it could result in an optimized item entering the bulk queue, which would then be skipped as optimized. Anyway, if you choose to skip the conversion, the conversion will still be done automatically when an item is opened from the Media Library (by going to the editor). In short, it is much better and recommended to perform the conversion, but it can also be skipped.
  • The plugin stores the data for new images in the new shortpixel_postmeta table, while it continues to look up the information in the postmeta table for images that existed and were optimized in the past. In short, ShortPixel first checks if the old metadata is present, then if the new metadata is present, and only if both are missing, the item is optimized.

In conclusion, all you need to do is to create a full backup of your website and then click on the “Convert legacy data” button in the notification that appears in the Media Library. Or go to Settings -> ShortPixel -> Tools and click on the button “Search and Migrate All“.