# Backend rendering of a preview image

**URL:** <https://discourse.threejs.org/t/backend-rendering-of-a-preview-image/43112>\
**Category:** Questions\
**Tags:** headless-render\
**Created:** [October 1, 2022, 7:58am UTC](https://discourse.threejs.org/t/backend-rendering-of-a-preview-image/43112 "2022-10-01T07:58:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [October 1, 2022, 8:59am UTC](https://discourse.threejs.org/t/backend-rendering-of-a-preview-image/43112/2 "2022-10-01T08:59:22Z")

</div>

`three.js` generates the thumbnails for its [examples](https://threejs.org/examples/) with a node.js script. The most important module of the script is Puppeteer: [GitHub - puppeteer/puppeteer: Node.js API for Chrome](https://github.com/puppeteer/puppeteer)

Related:

> [@Headless rendering functional, how to take screenshot?](https://discourse.threejs.org/t/headless-rendering-functional-how-to-take-screenshot/31700):
>
> I’m headlessly rendering a scene with Threejs + node and am currently taking screenshots via a command line program that opens a browser, loads the pre-computed scene (loads an array of shapes jsons from a DB), moves the camera to the correct position, takes a screenshot, automatically crops/saves the picture, and then closes the browser. I’d like to be able to do this completely headlessly: no browser whatsoever. No gui necessary. Is this possible, and if so, how? (Sorry this is not strictly …

The actual script is:

> <https://github.com/mrdoob/three.js/blob/1fd70895db2b40a5b01b537f6d77dedc49a8294d/test/e2e/puppeteer.js>

I don’t know how to implement the same with Java though.

---

_[View the full topic](https://discourse.threejs.org/t/backend-rendering-of-a-preview-image/43112)._
