sahusoftcom/eloquent-image-mutator

Using the latest laravel version, the getter from the model returns invalid data

Closed this issue · 3 comments

Hi,
calling {{ url($event->header_picture->original->url) }} in my view, i get an exception.
I debugged the getAttributeValue function and i noticed that the image service deals with json data (which is too complicated to understand as you are making several new instances there) and in my case only returns null values for url, width and height. The config file is loaded correctly as the $dimensions variable is looking good. The error must be somewhere else but I haven't found it yet. Maybe you know the problem already?
I believe the logic could be a lot more simplified with the same results...

@simonschaufi
The field against which you want to store the image should be of type text.

I'm using mongodb and it is of type text.

null is updated in cases when the image is not uploaded or the db column is not updated.

@simonschaufi Check if you have correct file permissions in the folder you are uploading the images too. And the soft links are created correctly.