I would like to hide the images on my website from those bots that do not respect robots.txt. I'm especially concerned about people search engines.
One option would be to write a PHP function that turns raster images into tables, with each cell 1 x 1 px and the background colored in the color of the corresponding image pixel. This would work, if the CSS is not overwritten or disabled by the user's browser.
Another option would be to use JavaScript to create the image or part of the image code (e.g. in a data url), similar to email protection. Most bots don't have JavaScript (I think), and they don't expect images to be hidden (so won't look for them in JavaScript code), but this relies on the user having JavaScript activated (many users deactivate JavaScript).
Are there any (better) options?
Aucun commentaire:
Enregistrer un commentaire