I am trying to override default picture converter in Nuxeo.
By default, Nuxeo provides following OOTB converters
I want to reduce the converters to
Following are the configurations that I have tried
Created a Multi-Module Contribution using Nuxeo-cli utility
Steps followed to create contribution
$>nuxeo bootstrap multi-module
$>nuxeo bootstrap contribution
target component used for contribution is org.nuxeo.ecm.platform.picture.ImagingComponent
$>nuxeo bootstrap package
Added following extension to the OSGI-INF/picture-conversion-core-contrib.xml file Ref
<?xml version="1.0"?>
<component name="org.nuxeo.ecm.platform.picture.ImagingComponent.default.config.override">
<require>
org.nuxeo.ecm.platform.picture.ImagingComponent.default.config
</require>
<extension target="org.nuxeo.ecm.platform.picture.ImagingComponent" point="pictureConversions">
<pictureConversion chainId="Image.Blob.Resize" description="Thumbnail size" id="Thumbnail" maxSize="100" order="0" rendition="true"/>
<pictureConversion chainId="Image.Blob.Resize" description="Original jpeg image" id="OriginalJpeg" order="100" rendition="true"/>
</extension>
</component>
I want to keep only two picture conversions hence adding only Thumbnail converter and OriginalJpeg converter.
After creating package I am installing the package on Nuxeo server with following command.
$>nuxeoctl mp-install /path/to/dir/sample_picture_converter-package-1.0-SNAPSHOT.zip
Even though the component is installed correctly on the Nuxeo server, the server is converting the images with default formats(ie. Thumbnail, Small, Medium, Large and Original).
What are the steps to override a default contribution in Nuxeo without Nuxeo studio?
Cross Posted on Nuxeo forum
We need to disable the default picture conversions explicitly in OSGI-INF/picture-conversion-core-contrib.xml. Given below the updated OSGI configuration.
<?xml version="1.0"?>
<component name="org.nuxeo.ecm.platform.picture.ImagingComponent.default.config.override">
<require>
org.nuxeo.ecm.platform.picture.ImagingComponent.default.config
</require>
<extension target="org.nuxeo.ecm.platform.picture.ImagingComponent" point="pictureConversions">
<pictureConversion chainId="Image.Blob.Resize" description="Thumbnail size" id="Thumbnail" maxSize="100" order="0" rendition="true"/>
<pictureConversion chainId="Image.Blob.Resize" description="Original jpeg image" id="OriginalJpeg" order="100" rendition="true"/>
<pictureConversion chainId="Image.Blob.Resize" id="Small" enabled="false" />
<pictureConversion chainId="Image.Blob.Resize" id="Medium" enabled="false" />
<pictureConversion chainId="Image.Blob.Resize" id="FullHD" enabled="false" />
</extension>
</component>
Answered by LaraGranite on Nuxeo forum