Reputation: 75
How does one create a webpage that is only an image and nothing else? For example, on the website https://just-read.it/, the index page is an image and nothing else. It displays like you've opened a direct link to an image, not like putting an <img/>
tag in an html file. How can this be done?
Upvotes: 1
Views: 2998
Reputation: 1
You could two this two ways.
<img src="example.jpg" alt="example image">
<button onclick="myFunction()">Click Me!</button>
<script>
function myFunction() {
location.replace("http://pages.artyserver.com/bee.jpg")
}
</script>
Hope this helped!
Upvotes: 0
Reputation: 43
For Apache/PHP servers, this can be done through the .htaccess file.
Pages can be redirected without changing the address in the URL bar. In this case it would be redirected to the image.
See here for more details (instead of redirecting to a .html or .php page it would be to an image).
This method is an alternative for Node.js.
Upvotes: 2