-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use GifBuilder for Placeholder images instead of relying on 3rd party #119
base: master
Are you sure you want to change the base?
Conversation
Use GifBuilder to generate a local placeholder image instead of relying on a 3rd party service. This will increase reliability and may also prevent exposure of internal URLs to a third party service.
'XY' => implode(',', [$this->width, $this->height]), | ||
'backColor' => '#C0C0C0', | ||
'format' => 'jpg', | ||
'10' => 'TEXT', | ||
'10.' => [ | ||
'text' => implode('x', [$this->width, $this->height]), | ||
'fontColor' => '#000000', | ||
'fontSize' => 26, | ||
'antiAlias' => false, | ||
'align' => 'center', | ||
'offset' => implode(',', [0,$this->height / 2]), | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a rough implementation... I would be very happy to discuss ideas on how we can improve this.
I love the idea. Maybe we can provide a solution like: https://github.com/IchHabRecht/filefill/blob/main/Classes/Resource/Handler/ImageBuilderResource.php ? |
We're currently working on another that would provide responsive images (srcset/sizes and picture tag) for fluid components (and especially in the styleguide). In that context we are rethinking placeholder images. Your PR is valuable input, thank you! However, we might need to move placeholder generation to a separate service class. We will look into it soon. |
Thank you! Sounds good! |
FYI: This is the current status of development: https://github.com/sitegeist/media-components |
347e14d
to
c676bcd
Compare
Use GifBuilder to generate a local placeholder image instead of
relying on a 3rd party service. This will increase reliability and may
also prevent exposure of internal URLs to a third party service.