mirror of
https://github.com/NyaaStudios/nyaabooru.git
synced 2025-12-09 21:42:57 +00:00
Add image info, increase php limits
This commit is contained in:
parent
cb086c4708
commit
68d316cd86
5 changed files with 24 additions and 3 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue