Add image info, increase php limits

This commit is contained in:
yuriko 🦊 2025-05-25 18:04:31 -04:00
parent cb086c4708
commit 68d316cd86
5 changed files with 24 additions and 3 deletions

View file

@ -78,6 +78,17 @@ class Post extends Model
return getimagesize($this->getFullUrl());
}
public function getDimensionsStr(): string
{
[$width, $height] = $this->getDimensions();
return "$width x $height";
}
public function getFileSize(): int
{
return Storage::size("posts/$this->id/full");
}
public function getAspectRatio(): string
{
list($width, $height) = $this->getDimensions();