Opened 15 years ago
Closed 9 years ago
#11993 closed enhancement (wontfix)
Add post thumbnail from url
Reported by: | paradox460 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.9 |
Component: | Post Thumbnails | Keywords: | needs-patch |
Focuses: | ui, administration | Cc: |
Description
If you got add a post thumbnail in 2.9, and use the "From URL" option, there is no link to set the image specified as the thumbnail. You can only put it in the post.
Change History (10)
#1
@
15 years ago
- Milestone changed from Unassigned to 3.0
- Summary changed from When adding a post thumbnail from url, there is no option for setting the thumbnail to Add post thumbnail from url
- Type changed from defect (bug) to enhancement
#3
follow-up:
↓ 4
@
15 years ago
One thing that would be actually quite useful is the ability to specify a url, then have a "download to server" option, like MediaWiki provides.
I believe they just use CURL.
#4
in reply to:
↑ 3
@
15 years ago
Replying to Paradox460:
One thing that would be actually quite useful is the ability to specify a url, then have a "download to server" option, like MediaWiki provides.
I believe they just use CURL.
We have a download_url() function that uses WP's HTTP API, which is used to download core/theme/plugin packages and in media_sideload_image(). media_sideload_image() is the ability you're looking for, though it is used only in Press This.
#7
@
12 years ago
media_sideload_image() can be extended to either:
- optionally return the attachment id (instead of html) so we can set_post_thumbnail( $post, $id ) with the results
- or we could include set_post_thumbnail( $post, $id ) in the function and add a boolean that says to make it the featured image
- or we could extract getting the attachment id into another function and make this function only responsible for building the html. Then if all I need is the id, I can call the extracted function instead.
I would love to write this patch, but would like to get your thoughts on preferred approach.
#9
@
9 years ago
- Focuses ui administration added
- Keywords needs-patch added; thumbnail post removed
- Version changed from 2.9.1 to 2.9
#10
@
9 years ago
- Milestone Future Release deleted
- Resolution set to wontfix
- Status changed from new to closed
Feeling disinclined to do this - we don't sideload for insert from URL in other contexts, and relying on some other host for your featured images doesn't seem like a good thing to encourage.
This is because we don't sideload the photo from a url and actually add it to the media library -- I'm a big fan of
media_sideload_image()
but we only use it in Press This.