Notes - Image Performance Implementation

Ericko wicaksono
Ericko wicaksono

image-performance

my own checklist to image implementation in a project:

  • check project bundle.
  • check require function, always make a static require.
  • add attribute to image, for example: lazy or decoding = async
  • add descriptive alternative and image name to improve seo
  • use svg for icon, if necessary.
  • when import a png image, always compress the image.
  • when using next js, implement next/image.
  • Encapsulate icon in a file, make a tree shaking object for group of image / icon. So, that can be imported some