Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageMedium#derivatives now works with image filters #1107

Merged
merged 10 commits into from
Oct 23, 2016
Prev Previous commit
Next Next commit
Fully reset image when derivatives method is called
Otherwise we get some funky results, with the possibility of two
different images being rendered between the full-width srcset
version and the original src version.
  • Loading branch information
fredrikekelund committed Sep 12, 2016
commit 4d1962041b24f5cf87ed0c640f9e55b4aac0a91b
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Page/Medium/ImageMedium.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public function derivatives($min_width, $max_width, $step = 200) {
// Clear any alternatives that have already been implied by the image's
// filename (eg. ones that had "@2x" or similar appended to their
// filenames)
$this->clearAlternatives();
$this->reset();

while ($width <= $max_width) {
$ratio = $width / $this->get('width');
Expand Down