Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

B on "Change media URLs on upload"

$
0
0

I'm looking to, programmatically on upload, change the URL of a media file to its URL on a CDN. I.e. modify site.com/wp-content/uploads/file.jpg to be cdn.site.com/wp-content/uploads/file.jpg.

Essentially what I'm asking is: which hook should I tie into? If anybody has more code help, that's great, but I think hook is the big question.

People before seem to have been wondering this, so I think it'll be helpful to resolve. Note also: I'm aware that W3 Total Cache and other plugins do this; I'd actually like it changed in the database (not just filtered on post render/output), and need to use some of my own logic, so I need to code snippet in my code.

Many thanks.


Viewing all articles
Browse latest Browse all 8245

Trending Articles