Adaptive-Images
Adaptive-Images copied to clipboard
Breaks when running locally on localhost
I believe that because it uses $_SERVER['DOCUMENT_ROOT']
to get the document root, which is not the same as the web URL root, the output path for images is wrong and images break on localhost.
Maybe try this? $whitelist = array( '127.0.0.1', '::1' );
if(!in_array($_SERVER['REMOTE_ADDR'], $whitelist)){
// set desired document root here
}