I dont get it...
The 1st works,

<!DOCTYPE html>
<BODY>
<TABLE align="center" valign="center" summary="This table places remote photography" border="1">
<CAPTION><EM>Photography</EM></CAPTION>
<TR align="center" valign="center">
<TD><img align="center" valign="center" height="495" width="1200" alt="An image from REMOTE location" src="http://www.petapixel.com/assets/uploads/2012/11/stackedclouds-1.jpg"></TD>
</TR>
</TABLE>
</BODY>

& the 2nd does not work ????

<!DOCTYPE html>
<BODY>
<TABLE align="center" valign="center" summary="This table places remote photography" border="1">
<CAPTION><EM>Photography</EM></CAPTION>
<TR align="center" valign="center">
<TD><img align="center" valign="center" height="495" width="1200" alt="An image from REMOTE location" src="http://www.hermosawavephotography.com/potd/detail.php?pixid=913565"></TD>
</TR>
</TABLE>
</BODY>

Dani AI

Generated

Good thread — and were on the right track. The browser needs a raw image resource (a direct JPEG/PNG file) to render with an <img> tag; a permalink that returns an HTML page will not work as the src. The quickest way to confirm and get the usable URL is to inspect what the page actually serves.

Use the browser DevTools Network panel and reload the permalink while filtering for image requests. The actual photo will appear as a resource whose response has a Content-Type like image/jpeg. See the Network Monitor docs for steps if unfamiliar: Using the Network Monitor. Right-clicking the displayed photo and selecting “Open image in new tab” or “Copy image address” will often give you the direct file URL immediately.

A simple command-line check can confirm the resource type and status:

curl -I "https://example.com/path/to/file.jpg"

Look for a 200 response and a Content-Type: image/* header. If that URL returns HTML, redirects, or a placeholder image, the host is likely wrapping the photo (or blocking hotlinking). You can also test referer-based blocking by setting a referer header in curl, but proceed only for testing.

If no stable direct URL exists or the site forbids hotlinking, use one of these respectful alternatives: obtain permission and host a copy yourself, use an official API or embed option if the site provides one, or implement a server-side proxy that caches the image (observe terms of use and copyright). Always check the site’s usage policy and give proper attribution when required.

Recommended Answers

All 5 Replies

The link in the first example is for a image. So you can assign that to the source of an image element. However, look closely at the URL for the second example. It points to a page (PHP), not an image.

Iknow but copy/paste into url
thats the link given by that site as a permalink to the image

It points to a page (PHP), not an image.

As JorgeM and naphets said, the second <img> source is an php page, not an image.

But just to make it clear, note that the point is that the php page returns HTML content. An url with .php extension could return an jpeg/bitmap content(when reading a image from a database in example), but it's not the case.

So... is there any way to use this sites images with they way they offer permanent links?

An url with .php extension could return an jpeg/bitmap content(when reading a image from a database in example), but it's not the case.

No, there's not. Because the site wasn't design for it.

But, you could use the image link:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.