On a site that is connected to Jetpack, first run this to verify that you get a cdn url:
wp eval "var_dump(wp_get_attachment_image_src( 71044, 'full'));"
Then test the new function that wraps:
wp eval "var_dump(\NewspackCustomContentMigrator\Logic\Attachments::get_attachment_image_src( 71044, 'full'));"
you should now not be getting a CDN url.
We can likely use this function from more places than the Block Generator where I wanted it fixed, but let's start with this.
This to avoid CDN urls in migrations
How to test
On a site that is connected to Jetpack, first run this to verify that you get a cdn url:
wp eval "var_dump(wp_get_attachment_image_src( 71044, 'full'));"
Then test the new function that wraps:
wp eval "var_dump(\NewspackCustomContentMigrator\Logic\Attachments::get_attachment_image_src( 71044, 'full'));"
you should now not be getting a CDN url.We can likely use this function from more places than the Block Generator where I wanted it fixed, but let's start with this.