/
Partial image format matching

Partial image format matching

After image is uploaded there are several ways (see http://guide.in-portal.org/eng/index.php/K4:Formatters#kUploadFormatter) to pre-process it before displaying to user. In most cases user is uploading large image, but on individual page image is resized according to page layout requirements. This allows to have single image copy for all cases and user, who uploads it doesn't need to resize image himself before uploading.

All pre-processing options need to be specified in format attribute of Field tag:

<inp2:unit-config-prefix_Field name="ImageField" format="..."/>

For example:

// correct
<inp2:unit-config-prefix_Field name="ImageField" format="resize:100x100;default=img/default.png"/>

// incorrect, but works
<inp2:unit-config-prefix_Field name="ImageField" format="test-resize:100x100;example-default=img/default.png"/>

As seen in example right it is also possible to prefix any of format options (e.g. "resize", "default", etc.) with any text and it still would work. I think this isn't a correct behavior because if format options naturally overlap (e.g. "fill" and "prefill"), then both will be considered as specified, however only one is specified in a template.

partial_image_format_matching_fix.patch

Related Tasks

Error rendering macro 'jira' : Unable to locate Jira server for this macro. It may be due to Application Link configuration.