I recently used the WordPress Importer to transfer hundreds of posts to a new site. It all worked except that the images don’t show up. After I looked at the code I noticed that all the src URLs include the pixel dimensions, as set in Settings > Media.
So, instead of this:
<img class="alignleft size-large wp-image-ID" src="/wp-content/uploads/YYYY/MM/image-name.jpg"
I get this:
<img class="alignleft size-large wp-image-ID" src="/wp-content/uploads/YYYY/MM/image-name-700x525.jpg"
The problem is, if I regenerate thumbnails to fit my new theme design, all the image links are broken — because they include the old pixel dimensions.
Maybe this is normal WP behaviour, but I can’t imagine it would be. Otherwise how is anyone supposed to move posts (with images) between sites?
Any thoughts on how I can fix this? Am I missing something obvious? Thanks!
- The topic ‘Pixel dimensions included in image src URL’ is closed to new replies.