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

[Documents] Page preview feature generates and saves huge images #5043

Open
aarongerig opened this issue Oct 2, 2019 · 0 comments

Comments

@aarongerig
Copy link
Contributor

commented Oct 2, 2019

Bug Report

We noticed some immensely large images (up to 1.5 GB) being generated and stored in /var/tmp when activating the document preview thumbnails.

Expected behavior

Pimcore should always produce a preview thumbnail or at least delete unused screenshots.

Actual behavior

Pimcore occasionally generates huge preview screenshots, which are unused and remain in the file system.

Steps to reproduce

The actual bug is in the \Pimcore\Image\HtmlToImage::convert method. In there Pimcore checks if the previously generated screenshot exists or is larger than 1000 Bytes. Only if so it returns true, otherwise it fails the conditional statement in \Pimcore\Model\Document\Service::generatePagePreview. Because of that the screenshot never gets deleted.

Could you please confirm this bug? If so, I will provide a PR to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.