menu

Questions & Answers

NgOptimizedImage warning

I'm trying new angular 15 feature to improve image performance and I came across this warning.

`The NgOptimizedImage directive (activated on an <img> element with the `ngSrc="/assets/fascinating.png"`) has detected that the intrinsic image is significantly larger than necessary.

` Basically the original image is too wide, and with the height and width attributes I made it too small for its size, in fact by increasing both the height and the width the warning disappears. But I want the image in that size, there is a way to remove that warning?

Answers(1) :

The warning will not appear to you in production mode.