Opened 17 years ago
Closed 11 years ago
#11993 closed enhancement (wontfix)
Add post thumbnail from url
| Reported by: | paradox460 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Post Thumbnails | Version: | 2.9 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: | Focuses: | ui, administration |
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
@
17 years ago
- Milestone Unassigned → 3.0
- Summary When adding a post thumbnail from url, there is no option for setting the thumbnail → Add post thumbnail from url
- Type defect (bug) → enhancement
#3
follow-up:
↓ 4
@
17 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
@
17 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
@
14 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.