So I upload a png and I get a png now, right?

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

I just noticed that the robots returns a PNG url if I upload a PNG now.
It was not like that before I think. Or am I completely wrong?

What robot are you talking about? Can you give me an assembly id?

We didn’t make any changes that should impact pngs.

I’m talking about the image/resize robot.
Assembly id : REDACTED
I uploaded a png image and I was getting jpg URLs after exporting to S3 before.
Now I get this URL :

http://fanclubsocial.s3.amazonaws.com/REDACTED/600x400_cropped_thumbnail_Selection_030.png

which is a PNG url itself.

The question is, does the robots follow the file extensions of the original uploads?
What do I get if a upload
- ‘image.PNG’ - ‘image.png’ - ‘image.jpg’ - ‘image.JPG’

Thanks in Advance.

The question is, does the robots follow the file extensions of the original uploads? What do I get if a upload

The image resize robot will keep the input format of the provided file unless you set the format parameter (documented here: https://transloadit.com/docs/image-resize ). This has not changed recently. However, your confusion may come from the fact that we determine the format of the input file by analyzing its contents, rather than looking at the extension (which would be unreliable). So if you previously uploaded jpeg files with a png extension, you would have gotten jpeg urls in the results.

Let me know if that makes sense / you have more details to investigate.

--fg

ok, Thank you.
I will do some experiments from my side too.

Alright, closing this for now. Feel free to re-open if you hit issues again.

I’m reopening this thread, since I see another associated problem with the implementation.

My template id : REDACTED

I tested two different images with the image resize robot.
-- abc.png – abc.PNG

See, both are png images but the extension is different, because one is in capital letters and the other in small letters. What my template do is, a couple of resize steps and upload all the files (including the :original) to amazon S3.

With the first image, everything works perfect. since all the output urls from S3 ends with small letter extensions (.png). But when processing the second image, things goes wrong. The extension for :original ends with capital letters (.PNG) and the other two processed (output of resize robot) returns small letter urls (.png).

See the problem here is that, S3 is case sensitive even with the extension. They dont allow me to access http://bla-bla-bla.png instead of http://bla-bla-bla.PNG. To be honest I think, the resize robot should keep the extension as it is from the original file. Since S3 is case sensitive, I need to take care of the extension of the file, which seems to be an overhead to me.

Can you give me an assembly id where this happened? The template id doesn’t let me look it up.

The assembly id is : REDACTED

Hi Felix,
Any update on this thread?

Hey subinsebastien,

I am taking over this ticket.

I checked our code and your right, we are lowercasing the extensions. We are currently discussing if we want to change this or not. Lowercase extensions are easier for us, but of course you have a point when you say that s3 is case sensitive.

For now please lowercase your extensions until we have decided what to do about this.

Sorry for the trouble. : (

Kind regards,
Tim

I have added this to our todo-list and am closing this ticket for now. Thank you for reporting this.

Kind regards,
Tim