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

Improved Automatic Brew thumbnail generation option #3501

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

Conversation

dbolack-ab
Copy link
Collaborator

This PR replaces #3219.

This is a feature addition that adds the option of creating a thumbnail directly from the first page of the brew.

MagicImage

This feature had issues with XSS support/non-support at various offsite resources. This PR resolves that issue by creating a proxy endpoint that loads for those resources.

An additional field, thumbnailSm, has been added to the brewStub schema to hold this data, if used.

Img substitution generates correct URLs but the substitution load seems to fail?
Still won't parse  some bits
This version of the code works *IF* all CSS URLs are relocated to trusted locations - IE, the local server.

After this I will be continuing my work attempting to do URL rewrites for arbitrary purposes in support of this PR and direct PDF creation.
This feature works in two parts.

This first part is by adding a prioxy-passthrough for resources. This enables the code to get around XSS issues we were previously having,.

The second part clones the first page, massages URLs in it's <Links>, <style>, and <img> tags to use the
L to load the resources then generate two thumbnails. One is 115px tall and the other is set at 50% the page height. Currently, only the smaller of the two is stored as a new BrewStub field.
@5e-Cleric
Copy link
Member

Closes #2278 to some degree.

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

Successfully merging this pull request may close these issues.

None yet

4 participants