[wp-trac] [WordPress Trac] #6430: WordPress 2.5 xmlrpc should
return image thumbnail URLs in wp.uploadFile
WordPress Trac
wp-trac at lists.automattic.com
Fri Mar 28 05:51:57 GMT 2008
#6430: WordPress 2.5 xmlrpc should return image thumbnail URLs in wp.uploadFile
---------------------+------------------------------------------------------
Reporter: mlossos | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.5
Component: General | Version: 2.5
Severity: normal | Keywords:
---------------------+------------------------------------------------------
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.)
Background:
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:
dsc-0151.jpg
Using the default thumbnail settings of 150x150 and 300x300, these files
will be created:
dsc-0151-300x199.jpg
dsc-0151-150x150.jpg
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.
--
Ticket URL: <http://trac.wordpress.org/ticket/6430>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list