A bookmarklet is a browser bookmark that contains JavaScript code instead of a web address. When clicked, bookmarklets can perform a wide variety of operations, such as running a search query from selected text or extracting data from a table. They are essentially bookmarks that run JavaScript code on the current page when clicked, allowing users to perform functions on the page they are already on instead of being directed to a new webpage. Bookmarklets are easy to use, portable, and can be shared across different devices. They are generally safer to use than standard programs, as they can only run when clicked and cannot access files on the hard drive.
Your code for the image looks correct. Everything is defined in the srcset and sizes attributes, but the browser downloads a completely different image than the one you expect. Let’s check why this is happening.