How can I make it so I can right click (Or Long-click in this case) to copy an image using the CustomWebView extension?

Sit back, relax and have a good read through the customwebview topic:

Look for base64 extensions here:

App Inventor Extensions | Pura Vida Apps

(you are unlikely to get all of this into a single line of javascript code...)