Multiple Thumbnail creation of uploaded image

Archived from the Transloadit support forum. Originally posted on July 17, 2014; details may be outdated, see our docs for current behavior. Original thread

Is there any way to create multiple resize thumbnails of uploaded image?

I need three different size of image which i upload through transloadit.

suggest me any.

Hey Munir,

yes you can just pipe the “:original” step into several “/image/resize” steps. Please see a demo here: https://transloadit.com/demos/image-resize/resize-to-75x75

Just imagine adding a second “thumb2” step below that one. Let me know if you need more help than this.

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Hey Tim,

I am getting Below Error when using :original

ASSEMBLY_STEP_UNKNOWN_USE: One of your step parameters references an unknown {use: …} value.

{“thumb1”:{“robot”:“/image/resize”,“width”:75,“height”:75,“use”:“original”,“resize_strategy”:“pad”,“background”:“#000000”}}

My Javascript Code is :

 $(function() {
$('form').transloadit({
wait: true,
triggerUploadOnFileSelection: false,
 params: {
auth: { key: "AUTHKEY" },
steps: {
"thumb1": {
robot: "/image/resize",
width: 75,
height: 75,
use:"original",
resize_strategy: "pad",
background: "#000000"
},
"thumb2": {
robot: "/image/resize",
width: 250,
height: 250,
use:"original",
resize_strategy: "pad",
background: "#000000"
},
"thumb3": {
robot: "/image/resize",
width: 350,
height: 350,
use:"original",
resize_strategy: "pad",
background: "#000000"
}
}
}
});
});

I’hv also create a Template which following code but when i test that one, image crop perfectly but image quality is not as that image.

{
"steps": {
"thumb1": {
"robot": "/image/resize",
"width": 200,
"height": 75,
"resize_strategy": "crop",
"correct_gamma": true,
"quality": 100
},
"thumb2": {
"robot": "/image/resize",
"width": 420,
"height": 360,
"resize_strategy": "crop",
"correct_gamma": true,
"quality": 100
},
"thumb3": {
"robot": "/image/resize",
"width": 600,
"height": 530,
"resize_strategy": "crop",
"correct_gamma": true,
"quality": 100
},
"export": {
"use": [
"thumb1",
"thumb2",
"thumb3"
],
"robot": "/image/resize",
"key": "REDACTED",
"secret": "REDACTED"
}
}
}

Please checkout this Screenshot :

https://nimbus.everhelper.me/client/notes/share/41067/LqHL8A3TVRWnxATCWLFBEa5g1fTy6ZBw/

You need to provide

“use”: “:original” (do not forget the colon) in all steps.

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

This discussion has been inactive for 30 days and has been marked as resolved automatically.
Feel free to reply to this ticket to re-open it and we will continue the investigation.

Kind regards,
Tim

Co-Founder Transloadit