What are some methods in PHP to prevent users from easily copying or saving images displayed on a website?

One method to prevent users from easily copying or saving images displayed on a website is to overlay a transparent image on top of the original image. This can make it more difficult for users to right-click and save the image, as they will end up saving the transparent overlay instead.

<?php
// Display original image with transparent overlay
echo '<div style="position:relative;">';
echo '<img src="original_image.jpg" style="width: 100%; height: auto;">';
echo '<img src="transparent_overlay.png" style="position:absolute; top:0; left:0; width: 100%; height: auto;">';
echo '</div>';
?>