Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sascha-egerer
Copy link

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.

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.
Comment on lines +62 to +73
'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]),
],
Copy link
Author

@sascha-egerer sascha-egerer Jan 24, 2023

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.

@lukasniestroj
Copy link
Contributor

I love the idea. Maybe we can provide a solution like: https://github.com/IchHabRecht/filefill/blob/main/Classes/Resource/Handler/ImageBuilderResource.php ?

@s2b
Copy link
Collaborator

s2b commented Jan 27, 2023

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.

@sascha-egerer
Copy link
Author

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!
should I close this PR?

@s2b
Copy link
Collaborator

s2b commented Mar 16, 2023

FYI: This is the current status of development: https://github.com/sitegeist/media-components

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants