A word of caution and frustration when using media_sideload_image

media_sideload_image details.

Currently the support docs for this function read:

Parameters Parameters


(string) (Required) The URL of the image to download.


(int) (Required) The post ID the media is to be associated with.


(string) (Optional) Description of the image.

Default value: null


(string) (Optional) Accepts ‘html’ (image tag html) or ‘src’ (URL), or ‘id’ (attachment ID).

Default value: ‘html’

Unfortunately when they say “Description” they really mean “title” of the attachment, and not the field named “description” that’s on every attachment page. There is no way that I can tell to add a description to your attachments when using media_sideload_image.

Leave a Reply