Watch our biggest AI launch event

Announcing Visual Copilot - Figma to production in half the time

Builder.io logo
Contact Sales
Platform
Developers
Contact Sales

Blog

Home

Resources

Blog

Forum

Github

Login

Signup

×

Visual CMS

Drag-and-drop visual editor and headless CMS for any tech stack

Theme Studio for Shopify

Build and optimize your Shopify-hosted storefront, no coding required

Resources

Blog

Get StartedLogin

Choosing and uploading images in Builder is quick and Builder takes care of optimization for you. This document covers the following:

To use images in Builder, take the following steps:

  1. Drag an Image Block from the Insert tab and drop it onto the work area.
  2. Click on the Image Block to select it.
  3. Click the Edit button.
  4. Click Choose Photo.
  5. Select a photo or upload your own.

Tip: Always use the Image block.

To support peak performance, Builder’s Image Block optimizes any image you add to it. This optimization takes place with the Image Block, not on background images, so make sure you always use the Image Block to help performance.

When you use Builder's Image Block for your images, Builder serves the correct optimized format for every web browser. Builder performs these optimizations so you don't have to:

  • The Image Block ensures you load the smallest possible image.
  • Builder analyzes your image as it relates to the layout of your page and determines the exact sizing of your image for all device sizes, automatically generating the optimal size for each screen.
  • Builder uses lazy loading, which loads images only when your users need them. This reduces how much users have to download.
  • Builder uses responsive page layout analysis to flag which images are below the page fold for each device so they can be lazy loaded.
  • Builder converts your image to the webp format.

If you're a developer and are looking for more control over the image that is served by Builder, read the Image API documentation.

Images automatically take up full width of their parent container when they are dropped on the page. An image's width can change if you adjust the alignment. If this occurs, change the image's width to 100% and it will take up the full width again.

To delete images in Builder's Visual Editor working area, for example on a page or a section, take the following steps:

  1. Click on the Image Block to select it.
  2. Press the Delete key.

To delete images you've uploaded to Builder that are in the Choose Photo dialogue, rather than in the Visual Editor, take the following steps:

  1. Click on the Image Block to select it.
  2. Click the Edit button.
  3. Click Choose Photo.
  4. Click on the Your Recent Photos tab.

Whenever you add an image to your site, always add alt text to images. Alt text is text that you provide with the image so that screen readers and search engines know what the image depicts.

To add alt-text to an image in Builder:

  1. Select the Image block and click Edit.
  2. In the Image block's Edit dialogue, enter the alt-text in the alt-text field.

The image below shows where the alt text field is located within the Image block's Edit dialogue. Remember that images serve as visual enhancements and should not be the only source of the information.

Image of where alt text is in the Image Edit dialogue. A note reads "Alt-text is here" with an arrow pointing to a field labeled alt text where you can enter alt text for the image.

As mentioned, Builder saves your images as WebP images. If you right-click on your live page to save an image, it will be saved as WebP.

If you're on a Mac, the Preview app can export the image to a png. If you're on a PC, Paint can convert an image.

Tip: Sometimes WebP images can exhibit unexpected behaviors in some browsers when zoom levels are changed. If this is an issue, we recommend changing the image format to jpg or png.

Despite the image optimization you get by using Builder's Image block, there may be times when you need to use an image that's hosted elsewhere.

You can accomplish this using a data binding.

With the Image block selected, open the Data tab and click +New Binding.

Under New Binding, next to Get, select Image from the dropdown arrow.

For the From field, enter your image URL in double quotes. This example uses https://www.cdc.gov/healthypets/images/pets/cute-dog-headshot.jpg.

Now your image will appear on your page. Here's a fiddle showing the data binding.

If you still need to upload an animated GIF, this section shows you how to upload additional file types.

Tip: Instead of using animated gifs, we recommend that you use videos for better performance. You can upload a video or embed a hosted video. In an uploaded video using the Video block, you can toggle various settings on the video such as loop, autoplay, and repeat.

If you can't select your file, you need to tell your computer that any file type is permissible. In your operating system dialogue, take the following steps.

On a Mac:

  1. Click the Options button and in the Format dropdown.
  2. Select All Files, as in the following image:

On a PC:

Next to the File name dropdown, select All Files, rather than the default of Custom Files, as in the following image:

Was this article helpful?

Product

Visual CMS

Theme Studio for Shopify

Sign up

Login

Featured Integrations

React

Angular

Next.js

Gatsby

Get In Touch

Chat With Us

Twitter

Linkedin

Careers

© 2020 Builder.io, Inc.

Security

Privacy Policy

Terms of Service

Newsletter

Get the latest from Builder.io

By submitting, you agree to our Privacy Policy

Product

Platform Overview

Integrations

What's New

Open Source

Builder

Builder

Mitosis

Mitosis

Qwik

Qwik

Partytown

Partytown

Popular Guides

From Design to Code Guide

Composable Commerce Guide

Headless CMS Guide

Headless Commerce Guide

Composable DXP Guide

Design to Code

Resources

Blog

Knowledge Base

Community Forum

Partners

Templates

Success Stories

Showcase

Resource Center

Frameworks

React

React

Next

Next.js

Qwik

Qwik

Gatsby

Gatsby

Angular

Angular

Vue

Vue

Svelte

Svelte

Remix logo

Remix

Nuxt

Nuxt

Hydrogen

Hydrogen

See All

© 2024 Builder.io, Inc.

Security

Privacy Policy

SaaS Terms

Security & Compliance

Cookie Preferences