# Migration API and images

**URL:** <https://community.prismic.io/t/migration-api-and-images/18497>\
**Category:** Developing with Prismic\
**Tags:** assets-api\
**Created:** [March 5, 2025, 8:15am UTC](https://community.prismic.io/t/migration-api-and-images/18497 "2025-03-05T08:15:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MichaelVestergaard](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/michaelvestergaard/32/4551_2.png) [@MichaelVestergaard](https://community.prismic.io/u/MichaelVestergaard)\
**Post date:** [March 5, 2025, 8:15am UTC](https://community.prismic.io/t/migration-api-and-images/18497/1 "2025-03-05T08:15:51Z")

</div>

I have a project in which we need to create 1000 product pages. The client has all data in a spreadsheet and I have had success using the Migration API (though only 1 document per second 🙂 )  
However, how do I add images for each page? I know I can reference an image by its ID, but how do we find that ID after upload to the Media Library? And how can I make sure the images are centered and resized properly?

---

<div class="post-metadata">

**Author:** ![Ezekiel](https://avatars.discourse-cdn.com/v4/letter/e/848f3c/32.png) [@Ezekiel](https://community.prismic.io/u/Ezekiel)\
**Post date:** [March 10, 2025, 10:23am UTC](https://community.prismic.io/t/migration-api-and-images/18497/2 "2025-03-10T10:23:17Z")

</div>

Hi @MichaelVestergaard,

To get the IDs of images uploaded to the Media Library, you can click on an image and copy the image’s ID from its URL. You can then map these IDs to the documents as needed when you're migrating them, like in this example body structure from the documentation: [Migration API Technical Reference - Documentation - Prismic](https://prismic.io/docs/migration-api-technical-reference#example-request-body).

The sizing and centering of images would have to be done separately, or by using Imgix URL parameters, for example:

- Resize: `?w=500&h=500&fit=crop`
- Focus: `&crop=focalpoint&fp-x=0.5&fp-y=0.5`

```auto
https://your-repo.cdn.prismic.io/media/{image-id}?w=500&h=500&fit=crop

```

Let me know if you have any other questions 🙂
