Migrating unoptimized imags from WordPress

A WordPress site considering migration to Ghost has a number of unoptimized images.

Does Ghost downscale images at all during import? If it imports the original size, does it then automatically generate appropriate sizes as they are displayed?

Given Ghost’s lack of ability to delete images, is my assessment correct that may be better to optimize images /before/ or during the migration? That could done by downloading the image folder and running a a bulk offline image compression tool on it.

I’m thinking of using the Frostoven Squooush fork. https://squoosh.frostoven.com/cli/

Appropriate sizes should generate when requested. I don’t /think/ the importer does anything, but you may have to look at the code to confirm.

Is disk space at a huge premium? If it isn’t, I’d probably just import as-is, rather than trying to guess what image size might be optimal in the future. (For example, a theme change could result in different sizes for the featured images needing to be generated in the future. I’d rather have those created from the original image, rather than a previously-optimized one.)

Caveat #1: I’m assuming here that these images are going into Ghost’s native cards and/or featured images. If you’re importing their HTML into HTML cards, then you’re not going to get any resizing from Ghost, and yeah, this might be a good time to optimize.

Caveat/Comment #2: Worth checking that the destination theme has srcsets to load the right size for featured images, logos, etc. I’ve seen enough that don’t. I lean towards thinking its better to fix the theme, but if that’s not an option, that might tilt the balance towards resizing before importing.

Thanks for the reply. I was considering not only right-sizing the images, but also compressing/optimizing them. I’m been testing with Squoosh a good deal, and often the images come up 60 to 90% smaller with hardly a visible change in quality.

I was considering pre-optimizing the image file sizes before import, but not worrying about the image dimensions.

1 Like

Ah, gotcha! That makes a lot of sense.

1 Like