Frequently Asked Questions
Not finding your answer here? Please email us: support@htmlcsstoimage.com. We enjoy helping people debug their HTML.
Getting Started
What file formats are supported?
PNG (default), JPG, WebP, and PDF. Simply change the file extension on your image URL: .png, .jpg, .webp, or .pdf. If no extension is specified, you’ll get a PNG.
What are the maximum image dimensions?
There’s no strict maximum size. The viewport_width limit is 6000 pixels. For height, there’s no set limit—full_screen screenshots can reach ~10,000 pixels tall.
Keep in mind images render at 2x by default, so the actual output resolution is double the viewport size. Smaller images will render faster and perform better.
How fast is the API?
Simple images render in as little as 300ms. Most images complete in 1-3 seconds. Complex pages with many external resources or JavaScript may take longer. Use ms_delay to control timing, or max_wait_ms to set a maximum wait time.
Why is my image twice as large as expected?
By default we render images at @2X resolution for high-DPI screens like iPhones and Retina displays. This ensures your images look crisp on modern devices.
To get @1X resolution, set device_scale: 1 when creating your image. Learn more about device_scale.
Technical
Can I use external CSS stylesheets?
Yes, embed the <link> tag in your HTML and it will be loaded before rendering. Multiple CSS files are supported. Large files may slow down initial render time. See this CodePen for an example.
Can I use external JavaScript?
Yes, external JavaScript works. Embed the <script> tag in your HTML and it will be loaded and executed.
If you need to wait for JavaScript to finish executing, use ms_delay to add a delay, or use render_when_ready: true and call ScreenshotReady() from your code when ready. Learn more about render_when_ready.
How do I wait for JavaScript to execute?
Two options:
ms_delay- Add a fixed delay (in milliseconds) before capturing. Start with500and adjust as needed.render_when_ready- Set totrueand callScreenshotReady()from your JavaScript when everything is loaded. This gives you precise control.
Learn more about render_when_ready.
Can I load external images?
Yes, include the full URL to your external image. The API will load it before creating the image.
<img src="https://example.com/yourimage.png" />
For best results, use HTTPS URLs. Some servers may block requests from our renderer.
Can I use custom fonts?
Yes! You have several options:
- Google Fonts - Use the
google_fontsparameter:"google_fonts": "Roboto|Open Sans" - Self-hosted fonts - Embed fonts using
@font-facein a<style>tag - Font CDNs - Link to fonts from services like Adobe Fonts or fonts.com
Can I use my own Font Awesome Pro icons?
Yes, include the <link> tag to the Font Awesome CDN in your HTML. You may need to whitelist hcti.io in your Font Awesome kit settings to allow our servers to load your icons.
How do I get a transparent background?
Use PNG format and pass the transparent background via the css parameter (not in a <style> tag in your HTML):
{ "css": "body { background-color: transparent; }" }
Transparency only works when set through the css parameter. Learn more.
How do I render an entire webpage?
We recommend passing the url parameter to screenshot a public webpage. Learn how here.
Alternatively, pass full HTML markup (starting with <html> and ending with </html>) and the API will render the entire page as displayed by Google Chrome.
Can I take full-page screenshots?
Yes, set full_screen: true to capture the entire scrollable height of a page, not just the viewport. Learn more.
How do I block cookie consent banners?
Set block_consent_banners: true when taking URL screenshots. This uses a browser extension to automatically dismiss most cookie popups. Learn more.
Do you support Chinese, Japanese and Korean characters?
Yes. We have Noto CJK installed in our renderer. If you find any language or character set that doesn’t render correctly, email us and we’ll add support for it.
What version of Google Chrome does HCTI use?
We keep HCTI up-to-date with the latest stable version of Chrome, typically within a few weeks of major releases. We run a full test suite to ensure images render as expected before upgrading.
Features
Can I generate PDFs?
Yes! Change the file extension to .pdf on any image URL. You can also customize PDF output with pdf_options for page size, margins, and scaling. Learn more about PDF options.
How do I generate social media images (OG images)?
Create a 1200x630px template with your branding, then generate unique images for each page by passing dynamic content. Many companies like Dev.to use this for automated social cards.
Can I create reusable templates?
Yes! Templates let you define HTML with variables (using Handlebars syntax) that get substituted at render time. Perfect for generating thousands of similar images with different content.
Integrations
Can I use the API with AI coding assistants?
Yes! We have an MCP server that works with Cursor, Claude Desktop, Windsurf, Zed, Cline, and other AI assistants. Generate images by describing what you want in natural language - no code required.
Learn more about MCP integration.
Do you have Zapier or Make integrations?
Yes! Both are available for no-code automation. Connect image generation to thousands of other apps without writing code.
Account & Billing
Is there a rate limit?
No per-second or per-minute rate limits. You can make requests as fast as you need. The only limit is your monthly image quota based on your plan.
What happens if I exceed my plan limit?
The API returns a 429 Too Many Requests error with a message showing your usage. You can upgrade your plan anytime from the Dashboard, and it takes effect immediately.
Do you offer a free trial?
Yes! Sign up at htmlcsstoimage.com to get free images to test the API. No credit card required to get started.
How do I upgrade my account?
You can change your plan anytime by visiting the Dashboard. Upgrades take effect immediately.
I need to generate a large amount of images one time, which plan should I use?
If an existing monthly plan doesn’t fit your needs, email us at support@htmlcsstoimage.com with the number of images you need. We can send you a one-time invoice and credit your account.
Can you provide an SLA?
Absolutely. All of our enterprise plans include an SLA. Contact us at support@htmlcsstoimage.com and we can build a custom plan for your specific needs.
How long will my image URL work?
Forever. As long as your HCTI account is active, we keep a copy of your generated image stored and accessible from your image URL.
How much bandwidth can I use?
Unlimited. All images served by hcti.io are cached by Cloudflare’s global CDN. Bandwidth is included in your subscription.
Can I set my images filename?
The filename is a randomly generated UUID. We don’t currently support custom filenames.
This design keeps your content secure (URLs are hard to guess) and helps us scale the infrastructure for millions of images. If you need a specific filename, you can download the image and rename it.
Can I use the API for a hackathon?
Definitely! If you’re a student building something cool, email us and we’d be happy to add free images to your account.
I have other questions, who do I ask?
Email us! support@htmlcsstoimage.com. We’d love to hear from you. We’re experts at debugging rendering issues - send us your toughest problems.