Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <h3>This demo shows <a href="">Robodog</a> resizing and optimizing your avatar using <a href="">Transloadit</a></h3>

<img id="avatar" width="100" src="">
<button id="choose-avatar">
  Pick your avatar


                body {
  font-family: system-ui, sans-serif;


                const TRANSLOADIT_KEY = '35c1aed03f5011e982b6afe82599b6a0'
const TEMPLATE_ID = 'cffe48403f5111e98403a762e6b42caf'

function pick () {
  const robodogPicker = Robodog.pick({
    providers: ['url', 'webcam'],
    waitForEncoding: true,
    params: {
      auth: { key: TRANSLOADIT_KEY },
      template_id: TEMPLATE_ID
    restrictions: {
      maxNumberOfFiles: 1,
      maxFileSize: 5242880

  robodogPicker.then(({ results, transloadit }) => {
    const avatar = document.getElementById('avatar')
    // For non-linear encoding jobs, inspect the `transloadit` object instead.
    // for simple one-to-one tasks, `results` will suffice:
    const imgSrc = results[0].ssl_url
    avatar.src = imgSrc

const btn = document.getElementById('choose-avatar')
btn.addEventListener('click', () => {

// Steps used in the Transloadit template:
// "steps": {
//   ":original": {
//     "robot": "/upload/handle"
//   },
//   "resize_image": {
//     "use": ":original",
//     "robot": "/image/resize",
//     "resize_strategy": "fit",
//     "width": 200,
//     "height": 200,
//     "imagemagick_stack": "v2.0.3"
//   },
//   "optimize": {
//     "use": "resize_image",
//     "robot": "/image/optimize",
//     "result": true
//   }
// }