Image Overview

As mentioned in the Get Started doc, raster data are represented as Image objects in Earth Engine. Images are composed of one or more bands and each band has its own name, data type, scale, mask and projection. Each image has metadata stored as a set of properties.

ee.Image constructor

Images can be loaded by pasting an Earth Engine asset ID into the ee.Image constructor. You can find image IDs in the data catalog. For example, to load JAXA's ALOS DSM:

var loadedImage = ee.Image('JAXA/ALOS/AW3D30/V2_2');

Note that finding an image through the Code Editor search tool is equivalent. When you import the asset, the image construction code is written for you in the imports section of the Code Editor. You can also use a personal asset ID as shown in this doc.

Get an ee.Image from an ee.ImageCollection

The standard way to get an image out of a collection is to filter the collection, with filters in order of decreasing specificity. For example, to get an image out of the Sentinel-2 surface reflectance collection:

var first = ee.ImageCollection('COPERNICUS/S2_SR')
                .filterBounds(ee.Geometry.Point(-70.48, 43.3631))
                .filterDate('2019-01-01', '2019-12-31')
Map.centerObject(first, 11);
Map.addLayer(first, {bands: ['B4', 'B3', 'B2'], min: 0, max: 2000}, 'first');

Note that the sort is after the filters. Avoid sorting the entire collection.

Images from Cloud GeoTIFFs

You can use ee.Image.loadGeoTIFF() to load images from Cloud Optimized GeoTIFFs in Google Cloud Storage. For example, the public Landsat dataset hosted in Google Cloud contains this GeoTIFF, corresponding to band 5 from a Landsat 8 scene. You can load this image from Cloud Storage using ee.Image.loadGeoTIFF():

var uri = 'gs://gcp-public-data-landsat/LC08/01/001/002/' +
    'LC08_L1GT_001002_20160817_20170322_01_T2/' +
var cloudImage = ee.Image.loadGeoTIFF(uri);

Note that if you want to reload a Cloud Optimized GeoTIFF that you export from Earth Engine to Cloud Storage, when you do the export, set cloudOptimized to true as described here.

Constant images

In addition to loading images by ID, you can also create images from constants, lists or other suitable Earth Engine objects. The following illustrates methods for creating images, getting band subsets, and manipulating bands:

// Create a constant image.
var image1 = ee.Image(1);

// Concatenate two images into one multi-band image.
var image2 = ee.Image(2);
var image3 =[image1, image2]);

// Create a multi-band image from a list of constants.
var multiband = ee.Image([1, 2, 3]);

// Select and (optionally) rename bands.
var renamed =
    ['constant', 'constant_1', 'constant_2'], // old names
    ['band1', 'band2', 'band3']               // new names

// Add bands to an image.
var image4 = image3.addBands(ee.Image(42));