I believe in the latest release they made the photo handlers consistent.
Nov 30, 2016
2
Level 6
Possibilities to modify Spark's built in cropper for team image's
Is it possible to customize Spark's built in image cropper to modify the cropped size without changing Spark's core components? Because Spark is now cropping every uploaded team image to an 300px square image. I already tried the Spark::swap method to modify the TeamPhotoController, but it's not possible to intercept an controller? Instead I need to use one of Spark's built in handle-method's. But there isn't any handle-method available for the TeamPhotoController like there is for the PhotoController (UpdateProfilePhoto).
TeamPhotoController code I want to modify:
/**
* Format the given file into a resized image.
*
* @param \Symfony\Component\HttpFoundation\File\UploadedFile $file
* @return string
*/
protected function toImage($file)
{
return (string) $this->images->make($file->path())
->fit(300)->encode();
}
Level 9
2 likes
Please or to participate in this conversation.