admin管理员组文章数量:1327849
Ultimately, I want to be able to disable the Right Click option across a website I am working on. I have managed to disable this across the Blog Content and all of the Images that appear within the Blog.
I have noticed that when you enter the Image address directly into the Browser, the Right Click still works. I have tried modifying the Code Snippets I have, as well as various Plugins, but nothing seems to work. Would it be a case that it is not possible to disable the Right Click option when loading the original image, by entering its Image address into the Browser?
Assuming this is the case, is it possible to prevent the Image from loading when entering the Image Address directly within the browser?
If there is a way, would this prevent the image from loading in Blog Posts etc too?
Ultimately, I want to be able to disable the Right Click option across a website I am working on. I have managed to disable this across the Blog Content and all of the Images that appear within the Blog.
I have noticed that when you enter the Image address directly into the Browser, the Right Click still works. I have tried modifying the Code Snippets I have, as well as various Plugins, but nothing seems to work. Would it be a case that it is not possible to disable the Right Click option when loading the original image, by entering its Image address into the Browser?
Assuming this is the case, is it possible to prevent the Image from loading when entering the Image Address directly within the browser?
If there is a way, would this prevent the image from loading in Blog Posts etc too?
Share Improve this question asked Jul 31, 2020 at 1:00 CraigCraig 3581 gold badge2 silver badges20 bronze badges 1- 1 cPanel offers something called Hotlink Protection. While it does not guarantee what you asked for, it prevents a lot of regular users from directly accessing a file on your server. But please keep in mind, everything that is sent to a user's device, is technically downloaded by that user, and someone with enough technical skill can easily copy those data no matter what you do. – Johansson Commented Jul 31, 2020 at 4:16
1 Answer
Reset to default 0Would it be a case that it is not possible to disable the Right Click option when loading the original image, by entering its Image address into the Browser?
No. You can’t control this.
Assuming this is the case, is it possible to prevent the Image from loading when entering the Image Address directly within the browser?
Possibly, but requests for files on the server bypass WordPress entirely, so any solution would need to be implemented outside of WordPress.
If there is a way, would this prevent the image from loading in Blog Posts etc too?
In all likelihood, yes.
本文标签: phpHow do I stop an Image Address from loading in the Browser
版权声明:本文标题:php - How do I stop an Image Address from loading in the Browser? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742220014a2435273.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论