Some crop()ed images are pointing at incorrect paths

On local host crop() and resize() are working perfectly.

However when I deploy to Digital Ocean via GitHub some of the calls to the crop() are returning 404s and when I take a look at why I find that the randomized folder (example “1a6492bbf4-1654456597”) is different in the generated path than what exists in the repo.

Any ideas on what is causing that and how to fix it?

The media folder should not end up in your repo and not be deployed.

So you are saying I should gitignore that folder? And then when pages load on Digital Ocean it will recreate the folder as needed?

If the server process has write permissions, it should, yes :slight_smile:

that is a big if.

Yes, if you pull from GitHub, you have to make sure that your file permissions and ownership is correct on the server. It often needs a post-deploy hook to set them correctly.

But think of the media folder as a cache file that is recreated when needed. If you deploy it to the server, you will almost certainly run into the issue you described above.