Is it possible to resize a image to a lower resolution when it’s being used from a url in a a <img>
tag?
for example <img src="http://someplace.com/img" width="100" height="100">
I want to use a personalized image that’s created with a Shopify app and is referenced in a line_item
property, and use it in a confirmation email but I don’t want the customer to be able to right click and save it.
is it possible to lower the resolution of the image?
2
Answers
CSS Only changes the image size visually. it means the file size is still like the original file and if the viewer download/save the image, it is getting it in its original size.
so just for visual purposes you can use something like this:
But if you want to hide the original file size you need to resize it with image editing software and upload the smaller one in the new URL and use it.
You can use an image manipulation library to resize and/or blur the images or change their resolution. You can manipulate a single image or multiple images in a folder and store the manipulated images in a new folder.
You can then add these new modified images to your page.
One such library is gulp-gm
for resolution change