Use the svg image tag. I recently learned how to use this myself:
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" viewBox="0 0 [HEIGHT WIDTH]" height="100%" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
<image height="[HEIGHT]" width="[WIDTH]" xlink:href="../images/[IMAGE FILE HERE]"/>
</svg>
Input your image height and width in the [HEIGHT WIDTH] section. So if your image is 1920x1280, viewbox="0 0 1920 1280" and height="1920" width="1280".
You can also adjust the height and width percentages to fill your size needs. If you want the image just 75%, just change the percentage in the svg tag.
Note: svg does not work for every format or every reader, but it's a great format to use.
|