Skip to content

Infinite loop if image is cropped and saved - S3 #15350

Closed

Description

@mrvecka

Describe the Bug

I've discovered this when I've updated to version 3.72.x

Then I went back to version 3.68.x and move version by version. I've noticed that this didn't happen on version 3.70 and started happening on version 3.71.
The attached project was created using npx create-payload-app@latest I just added s3 plugin.

Creating of new media or updating field on Media (e.g. alternative text) works fine. However cropping image results in infinite loop.
I can see "Submitting..." notification in admin and a bunch of Info logs from S3 plugin. No errors in console or network tab.

I have image versioning enabled on S3, I thought that might cause the issue. But no. I've disabled the versioning and it still loops infinitely.

In case versioning on S3 is enabled, and image is cropped and saved. One version should be created on S3. What actually happens is that many of image versions are created because of infinite loop.

Link to the code that reproduces this issue

https://github.com/mrvecka/payload-test/tree/feat/reproduce-corrupted-image-upload

Reproduction Steps

  1. run the project and migrations
  2. connect to AWS S3
  3. create new Media
  4. open "Edit image"
  5. crop the image and "Apply changes"
  6. save Media

Which area(s) are affected?

plugin: storage-*

Environment Info

Binaries:
  Node: 23.5.0
  npm: 10.9.2
  Yarn: 1.22.22
  pnpm: 10.5.2
Relevant Packages:
  payload: 3.73.0
  next: 15.4.10
  @payloadcms/db-postgres: 3.73.0
  @payloadcms/drizzle: 3.73.0
  @payloadcms/graphql: 3.73.0
  @payloadcms/live-preview: 3.73.0
  @payloadcms/live-preview-react: 3.73.0
  @payloadcms/next/utilities: 3.73.0
  @payloadcms/plugin-cloud-storage: 3.73.0
  @payloadcms/plugin-form-builder: 3.73.0
  @payloadcms/plugin-nested-docs: 3.73.0
  @payloadcms/plugin-redirects: 3.73.0
  @payloadcms/plugin-search: 3.73.0
  @payloadcms/plugin-seo: 3.73.0
  @payloadcms/richtext-lexical: 3.73.0
  @payloadcms/storage-s3: 3.73.0
  @payloadcms/translations: 3.73.0
  @payloadcms/ui/shared: 3.73.0
  react: 19.2.1
  react-dom: 19.2.1
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.6.0: Wed Nov  5 21:33:32 PST 2025; root:xnu-11417.140.69.705.2~1/RELEASE_ARM64_T6030
  Available memory (MB): 18432
  Available CPU cores: 11

Activity

  1. added
    status: needs-triage
    validate-reproduction
    on Jan 26, 2026
  2. added and removed
    validate-reproduction
    on Jan 26, 2026
  3. removed
    status: needs-triage
    on Jan 26, 2026
  4. JessRynkar commented on Jan 27, 2026

    @JessRynkar
    Member

    Hi @mrvecka thanks for reporting this, I'll be looking into it today.

  5. JessRynkar commented on Jan 27, 2026

    @JessRynkar
    Member
  6. JessRynkar commented on Jan 29, 2026

    @JessRynkar
    Member

    Fixed in PR: #15188

  7. added a commit that references this issue on Jan 29, 2026
    f4760ff
  8. added a commit that references this issue on Jan 29, 2026
    345a9c7
  9. github-actions commented on Jan 30, 2026

    @github-actions
    Contributor

    🚀 This is included in version v3.74.0

  10. github-actions commented on Feb 7, 2026

    @github-actions
    Contributor

    This issue has been automatically locked.
    Please open a new issue if this issue persists with any additional detail.

  11. locked as resolved and limited conversation to collaborators on Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions