Merge branch 'master' into v2

This commit is contained in:
Jan Böhmer 2025-08-13 16:07:20 +02:00
parent 247fed7d74
commit 3fcb5ce82e
4 changed files with 62 additions and 27 deletions

View file

@ -112,12 +112,12 @@ class AttachmentURLGenerator
/**
* Returns a URL to a thumbnail of the attachment file.
* For external files the original URL is returned.
* @return string|null The URL or null if the attachment file is not existing
* @return string|null The URL or null if the attachment file is not existing or is invalid
*/
public function getThumbnailURL(Attachment $attachment, string $filter_name = 'thumbnail_sm'): ?string
{
if (!$attachment->isPicture()) {
throw new InvalidArgumentException('Thumbnail creation only works for picture attachments!');
return null;
}
if (!$attachment->hasInternal()){