WordPress 2.5 xmlrpc should return image thumbnail URLs in wp.uploadFile
|Reported by:||mlossos||Owned by:||jonquark|
|Cc:||josephscott, redsweater, jonquark|
The xmlrpc call for wp.uploadFile (aliased to mw_newMediaObject) currently returns the URL of the uploaded file only. In WordPress 2.5, thumbnail files are automatically created. The xmlrpc API should provide a way to get the URLs of the thumbnail files, preferably in the returned hash from the wp.uploadFile call.
That is, wp.uploadFile currently returns url = "http://myhost/wp/wp-content/uploads/2008/03/myImage.jpg". In addition, it should return "thumbnailSmallUrl = ..." and "thumbnailMediumUrl = ...". (I'm not sure if this would break MetaWeblog compatibility.)
WordPress 2.5 now automatically creates thumbnail images for uploaded image files according to the (maximum) sizes specified in the Miscellaneous settings page. When resizing, the aspect ratio is maintained, and the filenames are named for the exact size of the image. For example, if I upload:
Using the default thumbnail settings of 150x150 and 300x300, these files will be created:
Note that the first filename for the medium thumbnail is called "300x199" not "300x300". It's thus difficult to guess the new thumbnail filename for the default settings.
Since these settings are user configurable, it's currently impossible for an xmlrpc client to guess the URLs of the thumbnails.
Change History (17)
comment:1 josephscott — 6 years ago
- Cc josephscott added
- Component changed from General to XML-RPC
- Type changed from defect to enhancement
- Keywords needs-patch added
- Milestone changed from 2.9 to Future Release
- Cc jonquark added
- Keywords has-patch added; needs-patch removed
- Owner changed from anonymous to jonquark
- Status changed from new to accepted