[wp-hackers] Image URL changes
mbarr at interactiveone.com
Wed Mar 3 18:58:43 UTC 2010
On Mar 3, 2010, at 1:32 PM, Otto wrote:
> How would you refer to the image?
> You could do something like it with a shortcode, but you still need a
> way to uniquely identify the image. Post ID's change when moving blog
> content around.
Just something that stores the img tag, and on render, inserts the actual site url, vs hard coding the site url in. It would be the same as the current method for storing the tag, but just be re-rendered to the current URL.
In implementation, it might be a short code, with the file path -
Or anything else that y'all think is a good way to implement it.
This is only to deal w/ the $SITE_URL changing, or the location to uploaded image changing. (Turning on a CDN vs having it off for initial testing, etc.)
In short: don't try to rewrite the entire image insertion code- just modify it a teensy bit to adapt to site / url change, just like we do w/ constructed links.
(My experience is on running the servers, vs the actual mechanics of how things are done in the code, or even on the front end. I apologize if i'm missing an obvious problem, but after trying to migrate sites between domains because someone has decided they liked a new name better.. It just seems that we handle site URL changes handily. I'd like to extend that to images, and other assets that are embedded into the posts.)
InteractiveOne - Senior System Engineer
e:mbarr at interactiveone.com
More information about the wp-hackers