Feature: Moving images to another host name #56

GoogleCodeExporter opened this Issue Apr 6, 2015 · 6 comments


None yet
1 participant
This is a feature request, not a bug report.

Optimizing images is great. It should be made so it works together with moving 
images to a host that doesn't send cookies to further optimize image handling 
(this is an existing test in the pagespeed plugin and a good best practise).

To do this it would require to small features:
a.) Have a configurable image output directory in the filesystem.
b.) Configure a host name / URL as image prefix.


GET http://test.com/index.html
<img src="bigpic.jpg">

Setting Image Directory: /var/pagespeed/images/
Setting Image Host:      http://statictest.com/

HTML Rewritten to:
<img src="http://statictest.com/NUMERICURL.jpg">

This would obviously require statictest.com to have a host entry on the same 
box as test.com is hosted.

Original issue reported on code.google.com by fxres...@gmail.com on 9 Nov 2010 at 10:54

Yes, we plan to support this feature -- it's an important PageSpeed 
recommendation and  mod_pagespeed should help automate it.  The same feature 
can also be used to move resources onto CDNs.

The plan is to support a configuration file option:

   ModPagespeedMapDomain destination_domain source_domain

We did not plan to implement the directory specifications as described above -- 
we would find the resource at its origin, cache it, and serve it from our 
cache, cache extended using a content hash.

Original comment by jmara...@google.com on 9 Nov 2010 at 2:56

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect
Interesting and even better if you would retrieve the objects on the fly. I am 
assuming that destination_domain would be configurable via regular vhosts 
entries on the system?

Original comment by fxres...@gmail.com on 9 Nov 2010 at 4:17

I have a related request:

It would be good to be able to specify the static media domain in a format such 
as: {m1|m2|m3}.staticserve.com and have PageSpeed use an algorithm to split the 
resources between these servers.  This would enable concurrent downloads of the 
media files across the different domains.

Original comment by gor...@gmail.com on 15 Nov 2010 at 11:17

I have split off 'domain sharding' to a separate enhancement request in Issue 83

Original comment by jmara...@google.com on 15 Nov 2010 at 12:15

The fix for this is to use ModPagespeedMapOriginDomain and is in SVN, and is 
described in the FAQ.

Original comment by jmara...@google.com on 3 Dec 2010 at 10:40

  • Changed state: Fixed
FYI the domain-sharding request that materialized in this issue, has been 
implemented in trunk as of r503.

Original comment by jmara...@google.com on 1 Mar 2011 at 6:31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment