A npm package to select/extract images from a website

I am working on an extension to search/edit images from a website. I am stuck and can’t find a package that lets me select an image on a website

The behavior I want goes like this:

  • Click the button on the extension
  • Then when I hover on the images on the website it should be outlined so I can pick it
  • this is what I need help with, will I have to manipulate the dom for
    all the images on a website do it or is there and extension to do it ?

Any help is appreciated, npm package, a repo or past experiences implementing such a thing.