Jump to content

Recommended Posts

Hi,
I want to use a the same photo for several image references.

So in my different html pages:

<img itemprop="image" title="$page_image_title1" alt="$page_image_alt1" src="http://example.com/ims/myhouse_green_timber_house.jpg">

<img itemprop="image" title="$page_image_title1" alt="$page_image_alt2" src="http://example.com/ims/myhouse_yellow_wooden_house.jpg">

<img itemprop="image" title="$page_image_title3" alt="$page_image_alt3" src="http://example.com/ims/myhouse_green_and yellow_cedar_house.jpg">  

 

I want all three of these to point to my image : "http://example.com/images/myhouse.jpg"

What is the best way to do this ?

Should I use the .htacess to rewrite the url - would that work
or is there a better way ? 

Many thanks for any ideas ...

And why do you want that? Search engine trickery?

 

What you describe is obviously terrible for performance and bandwidth, because the client has to download the exact same image over and over again (unless you literally redirected all image URLs to myhouse.jpg, which would be very confusing).

 

If you map arbitary paths to arbitary paths, that also means you'll have to manually maintain a long list of all mappings. A better approach would be to clearly separate the physical path from the descriptive stuff:

/images/actual_file_path--this-is-some-comment  // cut off everything after "--" with a rewrite rules
/images/actual_file_path?this-is-some-comment   // no rewriting required; the query part is simply discarded

???

<img itemprop="image" title="$page_image_title1" alt="$page_image_alt1" src="http://example.com/images/myhouse.jpg">
<img itemprop="image" title="$page_image_title1" alt="$page_image_alt2" src="http://example.com/images/myhouse.jpg">
<img itemprop="image" title="$page_image_title3" alt="$page_image_alt3" src="http://example.com/images/myhouse.jpg">
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.