I tried to include the functionality of adaptive images into a WP multisite but only the primary site works fine. Every other site creates a subfolder into the upload folder where all files are stored like:
Primary Site: uploads/ Other Site: uploads/sites/2 Other Site: uploads/sites/3
It became just broken images on my sub-sites, but the urls of all images are right. I installed WP multisite in subfolder like this: http://domain.de/site2
/* CONFIG ----------------------------------------------------------------------------------------------------------- */
$resolutions = array(1600,1280,960,768,600,480); // the resolution break-points to use (screen widths, in pixels)
$cache_path = "path/from/document_root/to/ai-cache"; // where to store the generated re-sized images. Specify from your document root!
$jpg_quality = 90; // the quality of any generated JPGs on a scale of 0 to 100
$sharpen = TRUE; // Shrinking images can blur details, perform a sharpen on re-scaled images?
$watch_cache = TRUE; // check that the adapted image isn't stale (ensures updated source images are re-cached)
$browser_cache = 60*60*24*7; // How long the BROWSER cache should last (seconds, minutes, hours, days. 7days by default)
/* END CONFIG ----------------------------------------------------------------------------------------------------------
------------------------ Don't edit anything after this line unless you know what you're doing -------------------------
--------------------------------------------------------------------------------------------------------------------- */
/* get all of the required data from the HTTP request */
$document_root = $_SERVER['DOCUMENT_ROOT'];
$requested_uri = parse_url(urldecode($_SERVER['REQUEST_URI']), PHP_URL_PATH);
$requested_file = basename($requested_uri);
$source_file = $document_root.$requested_uri;
$resolution = FALSE;
I tried to include the functionality of adaptive images into a WP multisite but only the primary site works fine. Every other site creates a subfolder into the upload folder where all files are stored like:
Primary Site: uploads/
Other Site: uploads/sites/2
Other Site: uploads/sites/3
It became just broken images on my sub-sites, but the urls of all images are right. I installed WP multisite in subfolder like this: http://domain.de/site2
--- UPDATE ---
My .htaccess file
My adaptive-images.php (except)
Thanks for your help
Ingo