Skip to content

Commit

Permalink
Serve the original version of the image if the client accepts it
Browse files Browse the repository at this point in the history
  • Loading branch information
christeredvartsen committed Dec 5, 2012
1 parent c558527 commit 4994e04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Imbo/Resource/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public function get(Container $container) {
$imageType = $this->image->getMimeType();
$acceptableTypes = $request->getAcceptableContentTypes();

if (!$extension) {
if (!$extension && !$this->contentNegotiation->isAcceptable($imageType, $acceptableTypes)) {
$typesToCheck = ImageObject::$mimeTypes;

$match = $this->contentNegotiation->bestMatch(array_keys($typesToCheck), $acceptableTypes);
Expand Down

0 comments on commit 4994e04

Please sign in to comment.