Showing the min and max size of the instance(s) could help users to upload a correct default image.

Comments

Tessa Bakker created an issue. See original summary.

tessa bakker’s picture

Status: Active » Needs work
StatusFileSize
new4.4 KB
tessa bakker’s picture

Status: Needs work » Needs review

And the correct status..

tessa bakker’s picture

StatusFileSize
new4.43 KB
new310 bytes

Patch #2 failed with only one instance, this patch will work with one or more instances.

tessa bakker’s picture

StatusFileSize
new3.98 KB

Removed stupid var.

      // Show new sizes, including var name.
      $element['#description'] =
rudiedirkx’s picture

Status: Needs review » Needs work

Drupal has a format for this. See modules/file/file.field.inc lines 958-968:

  • Images must be exactly !size pixels.
  • Images must be between !min and !max pixels.
  • Images must be larger than !min pixels.
  • Images must be smaller than !max pixels.

I think we can use those, even for variables with more than 1 different image field instance.

Also, it'd be a lot more readable if the dimension collection logic happened somewhere else, for all variables and image field instances together, grouped by var name.