Is there a way to add image dimensions on each media upload of laravel-medialibrary?
Im am thinking about something like this:
public function registerMediaCollections() {
$this->addMediaCollection('main')
->singleFile()
->withCustomProperties([
"width" => 600,
"height" => 400
]);
}
Just to make it more clear - I don't want to manipulate the image itself, I just want to store image width and height in the database, to have the possiblity to query for it. Something like SELECT * FROM
mediaWHERE JSON_EXTRACT(
custom_properties, "$.width") > 600
)
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Ol5La0
via IFTTT
Aucun commentaire:
Enregistrer un commentaire