Skip to content

outputFormat option not honored #116

Closed
@leviwilson

Description

@leviwilson

In image-handler.js there is an option for setting the outputFormat of the image:

if (request.outputFormat !== undefined) {  
   await modifiedImage.toFormat(request.outputFormat);  
}

However, the manner in which the image-request.js feeds that request object into there doesn't actually pass that through from the actual request:

    async setup(event) {
        try {
            this.requestType = this.parseRequestType(event);
            this.bucket = this.parseImageBucket(event, this.requestType);
            this.key = this.parseImageKey(event, this.requestType);
            this.edits = this.parseImageEdits(event, this.requestType);
            this.originalImage = await this.getOriginalImage(this.bucket, this.key)
            return Promise.resolve(this);
        } catch (err) {
            return Promise.reject(err);
        }
    }

Are we missing something or are we unable to tell the serverless-image-handler what the output format of the file should be?

The context is we have TIFF images and need them to be converted (see #45 for more details).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions