# Migrate images to S3

**URL:** <https://forum.ghost.org/t/migrate-images-to-s3/41485>\
**Category:** Self-hosting\
**Created:** [September 26, 2023, 5:14pm UTC](https://forum.ghost.org/t/migrate-images-to-s3/41485 "2023-09-26T17:14:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbhaxor](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/tbhaxor/32/17358_2.png) [@tbhaxor](https://forum.ghost.org/u/tbhaxor)\
**Post date:** [September 26, 2023, 5:14pm UTC](https://forum.ghost.org/t/migrate-images-to-s3/41485/1 "2023-09-26T17:14:07Z")

</div>

I already have images on my disk and I don’t want to exhaust the network bandwidth of the cloud service (its getting too costly now)

How can I migrate to S3 (digital ocean S3 spaces) upload existing images and also use the image source as s3 link? I can make images public.

---

<div class="post-metadata">

**Author:** ![markstos](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/markstos/32/18182_2.png) [@markstos](https://forum.ghost.org/u/markstos)\
**Post date:** [September 26, 2023, 9:19pm UTC](https://forum.ghost.org/t/migrate-images-to-s3/41485/2 "2023-09-26T21:19:15Z")

</div>

There are two parts to what you are trying to do.

## Migrating Existing Images

Follow any tutorial out there for how to upload a folder full of images to S3 and host them as a public website.

The base URL of the images is expected to change. So use a tool like `gctools find-replace` to find and replace all mentions of the old base URL with the new base URL.

> **[GitHub - TryGhost/gctools: Command line utilities for working with Ghost...](https://github.com/TryGhost/gctools#find-replace)**
>
> Command line utilities for working with Ghost content

## Storing newly uploaded images directly in S3.

For that, use the Ghost S3 Storage adapter. Docs are here: [Official Ghost + Amazon S3 Integration](https://ghost.org/integrations/amazon-s3/)

You’ll also find there some examples of how to migrate photos to S3 if they are stored on Google Drive or Dropbox.
