Moe Loubani Software Developer / AI Engineer / LLM Consultant

Squarespace to WordPress Image Issues and a Fix

If anyone has tried to take a Squarespace site and import it into WordPress then you have come across the issue where the images are still linked externally to Squarespace. No problem, there are plugins like Import External Images that will load those all up for you, right? Well it wasn’t so easy for me and after scouring the internet for a fix I ended up modifying the Import External Images plugin so that it uses curl to download the images instead of WordPress’ download_url function which was giving me a forbidden error. After a little tinkering and tweaking of the headers sent with the curl request I finally came up with a solution that should work for anyone having the same issue. You can download it here: http://www.moeloubani.com/downloads/import-external-images-sqspc.zip

Let me know if it works (or doesn’t)!

Edit: updated to work with image urls ending in ?format=original (or any query string after the image name for that matter).