Closed JRobich closed 2 years ago
Hi @JRobich
I cannot understand where the problem is or what you are proposing.
All methods accept options. The fit()
method accepts the position, as documented in the wiki:
https://github.com/mirko-pagliai/cakephp-thumber/wiki/How-to-use-the-helper#fit-and-fiturl
Try to give a more concrete example of what you are trying to do and what error you are getting.
This code appears to me to be working:
$this->Thumb->fit('400x400.png', ['width' => 200, 'position' => 'top']);
Ciao, At the moment it is not possible to pass options to the methods, for example the position for the fit method: top-left top top-right left center (default) right bottom-left bottom bottom-right source (https://image.intervention.io/v2/api/fit)
To fix the problem, just add to the RunurlMethod method $options
So from that:
$thumber->$name($params['width'], $params['height'])->save($params);
to that:$thumber->$name($params['width'], $params['height'], $options)->save($params);