0

we have a large wordpress site with thousands of reviews and images.

For security and copyright reasons, we would like to obscure or mask the direct link to the images used so that crawlers/bots can't see the direct links in the source code.

I have already tried wp hide and security enhancer which only alters the location to the file (using a rewrite), and when following the link it just finds the image at said altered location. What we would like to obtain is that the text to the actual link when viewing the source code is gone.

so this:

<img class="entry-thumb" src="https://staging.site.be/wp-content/uploads/2021/04/3d16670b-cae5-4baa-89e6-de6dafdd76de-150x150.jpg" alt="" title="Tourist LeMC :: Niemandsland" width="150" height="150">

turns into something like this

<img class="entry-thumb" src ="/other/imgpath/img.php?.....> alt="" title="Tourist LeMC :: Niemandsland" width="150" height="150">

Is this in any way possible in wordpress and if so how would I proceed ?

3
  • 2
    This has long been established as an exercise in futility.
    – vancoder
    Commented Apr 30, 2021 at 15:58
  • this can only be done partially.. if you transfer logic to load images via javascript (kind of like lazzy load does it) it put url of the image in some attribute like lazy-src - then JS transfer it to src when in viewport - and then you could only add logic to remove it from src after load .. but needs extensive testing Commented Jun 22 at 14:42
  • or if you dont want to mess with js events and uloading - there is always option to convert image to base64 on server - and spit it in source directly: <img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUA AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO 9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" /> Commented Jun 22 at 15:07

1 Answer 1

0

I don't believe this is possible. Images are 'replacement items' generated by the browser. They're not IN the html, they're CALLED by the html. If the reference is wrong, the image will never show. If the reference is right, the image will show... but it will be accessible to the visitor.

In other words, if you're going to put pictures on the web, people are going to be able to steal them. The only way around this that I'm aware of is to use and call the images in there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.