diff --git a/api/src/Page/Image.php b/api/src/Page/Image.php index 56925ae6d..423c65416 100644 --- a/api/src/Page/Image.php +++ b/api/src/Page/Image.php @@ -133,10 +133,9 @@ function _action_image() { if ($n < sizeof($images)) { $this->_browser_cache(); $ext = pathinfo($images[$n], PATHINFO_EXTENSION); - $file = $this->has_arg('f') ? $images[$n] : str_replace('.'.$ext, 't.'.$ext, $images[$n]); - if (file_exists($file)) { + if (file_exists($images[$n])) { $this->app->contentType('image/'.$ext); - readfile($file); + readfile($images[$n]); } else { $this->_error('Not found', 'That image is no longer available'); } @@ -161,11 +160,10 @@ function _xtal_image() { if ($n < sizeof($images)) { $ext = pathinfo($images[$n], PATHINFO_EXTENSION); - $file = $this->has_arg('f') ? $images[$n] : str_replace('.'.$ext, 't.'.$ext, $images[$n]); - if (file_exists($file)) { + if (file_exists($images[$n])) { $this->_browser_cache(); $this->app->contentType('image/'.$ext); - readfile($file); + readfile($images[$n]); } else { $this->_error('Not found', 'That image is no longer available');