Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk Upload for Media does not save crop and focal point selections - Website Template #11868

Closed
matthew-kelly opened this issue Mar 26, 2025 · 0 comments · Fixed by #12001
Closed
Assignees

Comments

@matthew-kelly
Copy link

Describe the Bug

While using the website template (ran into the bug on my personal project, but was able to reproduce it in a new project using the website template) the "Bulk Upload" option for the Media collection does not save crop and focal point selections. Images are uploaded unchanged (without cropping or focal point changes). This issue only happens when using the "Bulk Upload" option, uploading a single image from the Media collection screen using "Create New" and making edits works as intended (crop and focal point are saved).

I have run into this issue using the postgres adapter (Postgres v17). I have included a link to a reproduction repo, but this issue is encountered directly from the unchanged website template, so I recommend using pnpx create-payload-app my-project -t website and selecting the postgres adapter instead of using the repo.

Link to the code that reproduces this issue

https://github.com/matthew-kelly/payload-bulk-upload-bug-reproduction

Reproduction Steps

Steps here are done while in dev mode (pnpm dev), but I have tested local production (pnpm build) and my live website as well and the issue exists there as well.

"Bulk Upload" - multiple (and single) image upload

Enter the Bulk Upload screen from the Media collection screen.

Image

Add your photos (I dragged 3 jpegs into the window).

Image

Edit Image 1 (changed crop and focal point). Click "Apply Changes" button. Reopening the edit menu again will show that the changes are preserved (crop and focal point are still there).

Image

Navigate to the next image, and then go back to Image 1.

Image

Image 1 edits are lost upon reopening the Edit Image page.

Image

Return to Image 2 and make crop and focal point edits. Click "Apply Changes" button, and then click "Save" while still on the page for Image 2.

Image

After images are uploaded, click into Image 1 and click "Preview Sizes" button to see that the original image has been uploaded with no crop or focal point changes.

Image

The original image has also been uploaded for Image 2, with no changes saved.

Image

Uploading a single image with Bulk Upload also does not save the crop/focal point. The issue is solely with the Bulk Upload feature, number of images doesn't matter.

"Create New" - single image upload

Images are correctly cropped and have their focal point saved when using the "Create New" option.

Image
Image
Image

Which area(s) are affected? (Select all that apply)

area: templates

Environment Info

---- original tests on Payload 3.29 ----
Binaries:
  Node: 22.14.0
  npm: 10.9.2
  Yarn: 1.22.19
  pnpm: 10.3.0
Relevant Packages:
  payload: 3.29.0
  next: 15.2.2
  @payloadcms/db-postgres: 3.29.0
  @payloadcms/email-nodemailer: 3.29.0
  @payloadcms/graphql: 3.29.0
  @payloadcms/live-preview: 3.29.0
  @payloadcms/live-preview-react: 3.29.0
  @payloadcms/next/utilities: 3.29.0
  @payloadcms/payload-cloud: 3.29.0
  @payloadcms/plugin-form-builder: 3.29.0
  @payloadcms/plugin-nested-docs: 3.29.0
  @payloadcms/plugin-redirects: 3.29.0
  @payloadcms/plugin-search: 3.29.0
  @payloadcms/plugin-seo: 3.29.0
  @payloadcms/richtext-lexical: 3.29.0
  @payloadcms/translations: 3.29.0
  @payloadcms/ui/shared: 3.29.0
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 24.3.0: Thu Jan  2 20:22:00 PST 2025; root:xnu-11215.81.4~3/RELEASE_X86_64
  Available memory (MB): 16384
  Available CPU cores: 12




---- Have also tested after upgrading to the latest Payload version ----
Binaries:
  Node: 22.14.0
  npm: 10.9.2
  Yarn: 1.22.19
  pnpm: 10.3.0
Relevant Packages:
  payload: 3.31.0
  next: 15.2.3
  @payloadcms/db-postgres: 3.31.0
  @payloadcms/email-nodemailer: 3.31.0
  @payloadcms/graphql: 3.31.0
  @payloadcms/live-preview: 3.31.0
  @payloadcms/live-preview-react: 3.31.0
  @payloadcms/next/utilities: 3.31.0
  @payloadcms/payload-cloud: 3.31.0
  @payloadcms/plugin-form-builder: 3.31.0
  @payloadcms/plugin-nested-docs: 3.31.0
  @payloadcms/plugin-redirects: 3.31.0
  @payloadcms/plugin-search: 3.31.0
  @payloadcms/plugin-seo: 3.31.0
  @payloadcms/richtext-lexical: 3.31.0
  @payloadcms/translations: 3.31.0
  @payloadcms/ui/shared: 3.31.0
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 24.3.0: Thu Jan  2 20:22:00 PST 2025; root:xnu-11215.81.4~3/RELEASE_X86_64
  Available memory (MB): 16384
  Available CPU cores: 12
@matthew-kelly matthew-kelly added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. labels Mar 26, 2025
@github-actions github-actions bot removed the validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. label Mar 26, 2025
@PatrikKozak PatrikKozak self-assigned this Mar 26, 2025
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants