The following table describes the attributes you can use with the ccResizeImage binding.

Attribute

Description

source

The image source URL.

large

The override dimensions for the large viewport, expressed as a comma-separated list of two values, the first for height and the second for width.

medium

The override dimensions for the medium viewport, expressed as a comma-separated list of two values, the first for height and the second for width.

small

The override dimensions for the small viewport, expressed as a comma-separated list of two values, the first for height and the second for width.

xsmall

The override dimensions for the xsmall viewport, expressed as a comma-separated list of two values, the first for height and the second for width.

size

The dimensions used if an override dimension has not been specified for the current viewport. The value for this attribute can be a comma-delimited list of two values, the first for height and the second for width, for example:

size: '50,50',

Alternatively, the value can be one of the following: large, medium, small, or xsmall. If one of these values is specified and an override dimension is provided for that same size, then that override dimension is used. For example, if size: 'medium' and medium: '120,120' are set and the image is being viewed on a viewport without a specific override dimension, the image will be sized to 120 x 120 pixels.

If size is set to large, medium, small, or xsmall and no override dimension is provided for that same size, then the default dimensions are used, which are:

xsmall: 100X100

small: 300X300

medium: 475X475

large: 940X940

alt

The alternative text for the image.

errorSrc

The error image URL.

errorAlt

The alternative text for the error image.

outputFormat

The format of the converted images. Only JPEG is supported.

Note: GIF images cannot be resized or converted to JPEG as they may contain animation which is lost after resizing and conversion.

alphaChannelColor

The hexadecimal color code for the replacement color of the PNG alpha channel (default is white, FFFFFF).

quality

A number that lets you control the image resolution quality. The value of quality is a number from 0.0 (worst resolution but fastest load time) to 1.0 (best resolution but slowest load time).

For example, you might want to reduce the resolution of product listing images to speed up image loading times.

The default value of, quality is 1.0.

isSrcSetEnabled

Makes a set of variously sized images available to the browser and defines the conditions under which each one is loaded. See Use a srcset to specify the image to load for more details.

xsmall_img

A URL to an image in the Media library, used when the available width for displaying the image is less than 100 pixels. See Use a srcset to specify the image to load for more details.

small_img

A URL to an image in the Media library, used when the available width for displaying the image is less than 300 pixels. See Use a srcset to specify the image to load for more details.

medium_img

A URL to an image in the Media library, used when the available width for displaying the image is less than 475 pixels. See Use a srcset to specify the image to load for more details.

large_img

A URL to an image in the Media library, used when the available width for displaying the image is less than 940 pixels. See Use a srcset to specify the image to load for more details.

setMinHeightBeforeImageLoad

Reserves a minimum height on the page layout to accommodate an image before the image loads. This prevents the layout from shifting after the image loads. See Reserve a minimum height for an image for more details.


Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices