Skip to content

Commit

Permalink
Append the host to passed through srcs
Browse files Browse the repository at this point in the history
  • Loading branch information
weotch committed Oct 13, 2014
1 parent 9d9c19f commit cbd46bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Bkwld/Croppa/Croppa.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public function __construct($config = array()) {
public function url($src, $width = null, $height = null, $options = null) {

// Skip croppa requests for images the ignore regexp
if ($this->config['ignore'] && preg_match('#'.$this->config['ignore'].'#', $src)) return $src;
if ($this->config['ignore'] && preg_match('#'.$this->config['ignore'].'#', $src)) return $this->config['host'].$src;

// Defaults
if (empty($src)) return; // Don't allow empty strings
if (!$width && !$height) return $src; // Pass through if both width and height are empty
if (!$width && !$height) return $this->config['host'].$src; // Pass through if both width and height are empty
if (!$width) $width = '_';
else $width = round($width);
if (!$height) $height = '_';
Expand Down

0 comments on commit cbd46bd

Please sign in to comment.