How can i get my quad to only render my texture without stretching it?

I am trying to render a texture on a quad with the size 1x1. My goal is that only the texture is getting rendered and the “bars” on the space not filled with the texture should be transparent.

It should look something like this:

Do i need to use a shader to achieve that or is a script which gets the texture-size and resizes the quad the better option?

Make sure the boundary of your texture is transparent no less than 2px, set your texture wrap mode to clamp, then fiddle with the tiling and scaling of the texture in the material.

Honestly it’s better to add the intended empty spaces to the texture in Photoshop, in most cases the size of the raster image wouldn’t differ to much if you use PNG.