Overlay image (watermark) without losing the quality of original image

I am trying to add watermarks on the images
I am able to overlay logo (watermark) on the image via workers, but the size of the final image is less than the original image passed
I checked the limitation https://developers.cloudflare.com/images/image-resizing/format-limitations/#limits-per-format and my images are well within the limits

I am not adding any other options than this

options.cf.image.draw = [{
    url: "https://example.com/logo.png",
    bottom: 10,
    right: 10,
    opacity: 0.9
  }]

I tried this image https://images.pexels.com/photos/15953911/pexels-photo-15953911/free-photo-of-city-road-street-building.jpeg
The original size is 4.1MB but when I pass it through the worker it becames 2.4MB

Is it possible to preserve the size of the original image

Hi there,

If you don’t specify quality it will default to 85% of the original image.
This doesn’t mean that by specifying 100 you will get the exact same size, but you should get the exact same quality nonetheless.

Take care.