Image uploading with Intervention - how to maintain DPI
I am uploading images using Intervention Image. I am not resizing them at all but I am encoding them (encode('jpg', 100) and streaming them to AWS S3 (stream('jpg', 100).
My source images have a DPI of 350. The uploaded images have a resolution of 96. Why is this and how can I maintain the resolution of the uploaded image?
if they are already jpg, why encode them to jpg? I am no image expert, but jpg is not a lossless format, so could it be that you lose some details in the encoding?
Also, can you separate the process to determine if the reduction happens in the encode() step or the stream() step? Or both?
Even if I just save the file to local disk, no encoding, just $img->save('/path', 100) my image DPI reduces to 96, despite the original being much higher DPI than that.