Tagged Questions
66
votes
17answers
120k views
How to extract img src, title and alt from html using php?
I would like to create a page where all images which reside on my website are listed with title and alternative representation.
I already wrote me a little program to find and load all HTML files, ...
10
votes
2answers
8k views
load the image from outside of webcontext in jsf
I need to display the image which is reside outside of webapps folder in web application using jsf <h:graphicimage> tag or html's <img> tag. How can I achieve that?
465
votes
24answers
83k views
When to use IMG vs. CSS background-image?
In what situations is it more appropriate to use an HTML IMG tag to display an image, as opposed to a CSS background-image, and vice-versa?
Single-reason answers are welcome, but I'm hoping ...
22
votes
2answers
9k views
Should setting an image src to data URL be available immediately?
Consider the following (fragile) JavaScript code:
var img = new Image;
img.src = "data:image/png;base64,..."; // Assume valid data
// Danger(?) Attempting to use image immediately after setting src
...
42
votes
11answers
34k views
Convert web page to image [closed]
I wonder if there is any way to convert a web page (from any given URL) into an image?
this is basically equivalent to taking a "screenshot" of the page after opening it.
There is a method to do it ...
6
votes
4answers
3k views
Loading images from jars for Swing HTML
While this answer works to load images from Jar files for ImageIcons, I cannot seem to get the right path for images referenced in Swing HTML.
This displays an image in the Swing HTML when the ...
11
votes
15answers
15k views
How to prevent downloading images and video files from my website?
How to prevent downloading images and video files from my website? Is it possible?
What would be the best way to do this?
15
votes
8answers
27k views
img onload doesn't work well in IE7
I have an img tag in my webapp that uses the onload handler to resize the image:
<img onLoad="SizeImage(this);" src="foo" >
This works fine in Firefox 3, but fails in IE7 because the image ...
10
votes
10answers
12k views
Center an Image vertically and horizontally using CSS
How do I vertically and horizontally center an image when I do not know the size of it? I asked this question and someone suggested using a table. This isn't the first time I heard a table can do it ...
33
votes
5answers
20k views
“img” elements: Block level element or inline element?
I've read somewhere that IMG elements behave like both. If correct, could someone please explain with examples?
66
votes
7answers
81k views
CSS Display an Image Resized and Cropped
I want to show an image from an URL with a certain width and height even if it has a different size ratio.
So I want to resize (maintaining the ratio) and then cut the image to the size I want.
I ...
44
votes
7answers
48k views
How to force a web browser NOT to cache images
Background
I am writing and using a very simple CGI-based (Perl) content management tool for two pro-bono websites. It provides the website administrator with HTML forms for events where they fill ...
80
votes
10answers
200k views
Image auto resize to fit div container
How do you auto-resize a large image so that it will fit into a smaller width div container whilst maintaining it's width:height ratio?
Example: stackoverflow.com - when an image is inserted onto ...
25
votes
5answers
42k views
href image link download on click
I generate normal links like: <a href="/path/to/image"><img src="/path/to/image" /></a> in a web app.
When I click on the link, it displays the picture in a new page. If you want to ...
13
votes
2answers
16k views
base64 encoded images in email signatures
I have to include some images (company logo's etc) in email signatures. I've had all sorts of issues using the embedded images produced by the email system in question (they get sent as attachments ...