Using Optimize Robot with the Resize Robot - How?

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

I’ve got many templates currently working in the wild but am getting crushed on bandwidth at the far end of my routes. From what I see, I should be washing my resizes through the optimize robot as a second step. I can’t seem to figure out how to use the robots/resize step as the precursor for my robots/optimize following step. Any pointers would be greatly appreciated! The documentation does not provide a clear example for utilizing multiple robots in conjunction.

I’ve pasted two of my assemblies below.

"profileTemplate": { "profile.png": { "background": "none", "use": [":original"], "robot": "/image/resize", "width": 90, "height": 90, "resize_strategy": "crop", "strip": true, "format": "png" }, "[email blocked]": { "background": "none", "use": [":original"], "robot": "/image/resize", "width": 180, "height": 180, "resize_strategy": "crop", "strip": true, "format": "png" } }

Again, many thanks!

Sorry about the missing JSON line breaks, can’t get the paste correct in the code embed..

Hi there,

I noticed in your second step you you :original. These are the original uploads. If you change it to the name of your first step, you chain them together.

Makes sense? Otherwise let me know and I’ll flesh out a detailed example for you.

Kind regards,
Kevin

Sent from mobile, pardon the brevity.

Hi ,

Where you able to figure this out?

Best,
Kevin

We did figure it out, thank you. We tested the robot but figured out we weren’t saving anything because the files we send up are already optimized from Photoshop. And actually, something you may want to look into - many of the files we ran through the robot cam out slightly larger than they went in. In that case, you guys might want to toss out your optimized result and stick to the uploaded one?

Anyways, thanks for following up and we appreciate the service you guys are providing us!

Brant Wellons
Senior Developer
Jester Communications

Hi Brant,

We get good results overall but to be honest I haven’t tried our bot with Photoshop-pre-optimized-images. I would not be not surprised if Adobe is able to get a better result than our tool, and I think it makes sense that we stick to the original if the filesize of the optimized version turns out to be bigger. One complicating factor is that some people use the optimize bot to strip metadata.

I’ll talk this over with the team, thanks for your feedback, helpful!

Best,
Kevin