Skip to content

Fix createImageFromParams to return raw image or url using a custom template #34

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

Merged
merged 3 commits into from
Jun 14, 2025

Conversation

sweptsquash
Copy link
Contributor

This pull request includes updates to documentation and enhancements to the OgImage class to improve functionality and maintainability. The most important changes involve adding installation instructions for different Ubuntu versions in the README.md and extending the createImageFromParams method to support custom templates and return options.

Previously the method createImageFromParams used a custom template and returned a raw image this PR makes a change to reintroduce this support. By default createImageFromParams will return the url of the generated/cached image.

Documentation Updates:

  • Added installation instructions for Ubuntu 22.04+: Updated the README.md to include steps for installing Chromium on Ubuntu 22.04+ using a new PPA, along with a note to update the CHROME_PATH environment variable.

Enhancements to OgImage Class:

  • Improved method formatting: Fixed formatting in the getStorageImageFileData and getStorageViewFileName methods to improve code readability.
  • Extended createImageFromParams method: Added support for specifying a custom template and an option to return the raw image data instead of the URL. This makes the method more versatile for different use cases.

@Baspa Baspa self-assigned this Jun 14, 2025
@Baspa Baspa added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 14, 2025
@Baspa
Copy link
Contributor

Baspa commented Jun 14, 2025

Thanks @sweptsquash! I'll try to take a look at it tonight.

@Baspa Baspa merged commit 84837f2 into backstagephp:main Jun 14, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants