[wp-hackers] Downloading with media_sideload_image

Alex Dunae alex at dunae.ca
Thu Feb 18 01:22:05 UTC 2010


I'm create a theme that will use YouTube thumbnails as the post thumbnail when a YouTube link is present, but I've run into a block with media_sideload_image.  It returns an HTML string, not the new attachment's ID.  Is there a way to attach a remote image to a post and get its ID as the return value?

Thanks in advance for any help.




More information about the wp-hackers mailing list