Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: MOTION-157

Status
colourRed
titleDeprecated

Note

Image provider definition has been deprecated since Magnolia 6.0. It is part of the Magnolia 5 UI framework.

For the updated implementation, see Preview definition for Magnolia 6 UI instead.

Include Page
_What is an image provider
_What is an image provider

...

Here is an example image provider definition that uses default classes.

...

0

 

 

Code Block
languagejs
imageProvider:
  class: info.magnolia.ui.imageprovider.definition.ConfiguredImageProviderDefinition
  imageProviderClass: info.magnolia.ui.imageprovider.DefaultImageProvider
  originalImageNodeName: jcr:content
Localtab
titleJCR node
Advanced Tables - Table Plus
heading
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

Node name

Value

Mgnl n
imageProvider

 

Mgnl p
class

info.magnolia.ui.imageprovider.definition.ConfiguredImageProviderDefinition

Mgnl p
imageProviderClass

info.magnolia.ui.imageprovider.DefaultImageProvider

Mgnl p
originalImageNodeName

jcr:content

Properties:

class

required

Image provider definition class that reads the configuration properties and can supply additional parameters to the image provider class. The definition class must implement the 

Javadoc
0info.magnolia.ui.imageprovider.definition.ImageProviderDefinition
 interface. Set the value to a fully-qualified class name.

imageProviderClass

required

Actual implementation that generates thumbnail images. The class must implement the 

Javadoc
0info.magnolia.ui.imageprovider.ImageProvider
 interface. You can use 
Javadoc
0info.magnolia.ui.imageprovider.DefaultImageProvider
 which provides images for objects of MIME type image/* and delegates to the Imaging module to generate and store the images.

imageExtension

optional, default is png

Extension used to deliver the image.

imagingServletPath

optional, default is /.imaging

Path where the imaging servlet resides.

originalImageNodeName

optional, default is originalImage

Name of the JCR node where the original source image is stored. For example, if a file upload field on a form stores the image in a node named photo set the value to photo.

 


Here are the default image generator configurations that

Javadoc
0info.magnolia.ui.imageprovider.DefaultImageProvider
 uses. portrait is displayed at the bottom of the action bar and thumbnail in the thumbnail view.

...

heading0
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

...

Node name

...

Value

...

Mgnl f

...

Mgnl f
imaging

...

Mgnl f
config

...

Mgnl f
generators

...

Mgnl n
portrait

...

Mgnl n
outputFormat

...

Mgnl n
operations

...

Mgnl n
parameterProviderFactory

...

Mgnl p
class

...

info.magnolia.imaging.operations.ImageOperationChain

...

Mgnl n
thumbnail

...

Mgnl n
outputFormat

...

Mgnl n
operations

...

Mgnl n
parameterProviderFactory

...

Mgnl p
class

...

Image Added