Bulk uploading images from the Media Library UI

If you need to upload a bunch of image files into your Media library for content editors to use them when creating content, just drag and drop the files into your Media Library UI (or click upload, and select multiple files on your device).

Importing images along with Import jobs

If you're importing documents that contain images, just provide the path of the images in your JSON files. The importer will download the files from the provided URL or local file path, add them to your repository’s media library, and attach them to the corresponding field in the document you're importing.

If a given asset is used several times in one import batch, that asset will be added only once to the media library.

Below is the basic data you need to include in your JSON files to import images without any resizing or cropping options. If needed, you can add more options to import images and resize them for multiple responsive views.

Importing new images that are online

In your JSON file, just reference the URL of the online image.

{
"image_field1": {
"origin": {
"url": "https://images.ladepeche.fr/api/v1/images/view/5c37588b3e454652f74478af/large/image.jpg"
}
}
}

Importing new local images
Just reference the local path of the image file added to your ZIP archive.

{
"image_field2": {
"origin": {
"url": "toto.jpg"
}
}
}

Importing documents that reference an image already existing in your repository Media Library

Just provide the Image origin ID and URL.

{
"hero_image": {
"origin": {
"id": "Xs0bIhIAACEAWMj5",
"url": "<https://prismic-io.s3.amazonaws.com/slicemachine-blank/6b2bf485-aa12-44ef-8f06-dce6b91b9309_dancing.png>"
}
}
}
Did this answer your question?