Jetpack sometimes messes up image paths
Closed this issue · 2 comments
May in fact be the root cause of #17.
Jetpack's Photon module changes the image URL of thumbnails (but not, it seems, the outcome of wp_get_attachment_url()
).
This results in a broken image path, and the image is subsequently not uploaded.
This can be disabled: https://github.com/Automattic/jetpack/blob/master/projects/plugins/jetpack/class.photon.php#L707.
This may very well be the way to go. Alternatively, we could always upload the original image instead of the "large" thumbnail (when available, we fall back to the original anyways, in case it doesn't).
Note: This does normally not happen when posting from WP Admin. (It could, though, it depends.)
Long story short: don't use wp_get_attachment_image_src
. Or, prevent Jetpack from altering it. Or, if that still doesn't lead us to the correct local file path, upload the original image instead. Something like that.
fwiw, this s the URL that's getting passed around in the function: