Skip to content

Replacement for thumbor parameters using the new json parameters #390

Answered by dougtoppin
johnbest asked this question in Q&A
Discussion options

You must be logged in to vote

@johnbest i just realized that I had not replied to you before now and am sorry about the delay.

Is the following a request that does what you were interested in with output as a jpeg?

    imgReq = JSON.stringify({
        bucket: bucket,
        key: 'key.tiff',
        edits: {
            "toFormat": "jpeg",
            "resize": {
                "width": 100,
                "fit": "cover"
                }
        }
    });
    encStr = Buffer.from(imgReq).toString('base64');
    imageUrl = `${api}/${encStr}`;

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@johnbest
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by dougtoppin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants