1. As for image settings in Media/Images I set up the maximum resolution: 1600x1600

Media types --> Image --> Manage fields --> Edit
/admin/structure/media/manage/image/fields/media.image.field_media_image
1

2. It works perfectly fine if I am using the standalone form

Add media --> Image
/media/add/image
2

3. But whenever I try to use the modal form, this resolution setting is missing, and the uploaded picture is not resized at all...

3

  • Drupal: 10.0.4
  • PHP: 8.1.14
CommentFileSizeAuthor
d03.jpg63.95 KBmornel
d02.jpg40.42 KBmornel
d01.jpg101.34 KBmornel

Issue fork drupal-3345853

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mornel created an issue. See original summary.

mornel’s picture

Issue summary: View changes
mornel’s picture

Issue summary: View changes

whitedevil made their first commit to this issue’s fork.

whitedevil’s picture

Hey, I have checked the issue and on some R&D about it I found it is related to this issue Media Library field widget not enforcing image limits . and the patch given by @simon_tma works.

Here is the patch link from the discussion https://www.drupal.org/files/issues/2021-09-03/media_field_0.patch

mornel’s picture

Thank you @whitedevil!

The patch you provided works for me an now dimension limits are working properly.

cilefen’s picture

Status: Active » Closed (duplicate)