Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Wolfram Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • System Modeler
  • Wolfram Player
  • Finance Platform
  • Wolfram Engine
  • Enterprise Private Cloud
  • Application Server
  • Wolfram|Alpha Notebook Edition
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

WolframConsulting.com

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Wolfram Notebook Assistant + LLM Kit
    • System Modeler
    • Wolfram Player
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Wolfram Engine
    • Enterprise Private Cloud
    • Application Server
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
WebP (.webp)
  • See Also
    • Import
    • Export
    • CloudExport
    • CloudImport

    • Formats
    • PNG
    • GIF
    • JPEG
    • BMP
    • PBM
    • TIFF
    • ICC
  • Related Guides
    • Graphics Importing & Exporting
    • Image Processing
    • Importing & Exporting
    • Listing of All Formats
    • Raster Image Formats
  • Tech Notes
    • Importing Graphics and Sounds
    • Exporting Graphics and Sounds
    • See Also
      • Import
      • Export
      • CloudExport
      • CloudImport

      • Formats
      • PNG
      • GIF
      • JPEG
      • BMP
      • PBM
      • TIFF
      • ICC
    • Related Guides
      • Graphics Importing & Exporting
      • Image Processing
      • Importing & Exporting
      • Listing of All Formats
      • Raster Image Formats
    • Tech Notes
      • Importing Graphics and Sounds
      • Exporting Graphics and Sounds
IMPORT/EXPORT FORMAT
  • See Also
    • Import
    • Export
    • CloudExport
    • CloudImport

    • Formats
    • PNG
    • GIF
    • JPEG
    • BMP
    • PBM
    • TIFF
    • ICC
  • Related Guides
    • Graphics Importing & Exporting
    • Image Processing
    • Importing & Exporting
    • Listing of All Formats
    • Raster Image Formats
  • Tech Notes
    • Importing Graphics and Sounds
    • Exporting Graphics and Sounds
    • See Also
      • Import
      • Export
      • CloudExport
      • CloudImport

      • Formats
      • PNG
      • GIF
      • JPEG
      • BMP
      • PBM
      • TIFF
      • ICC
    • Related Guides
      • Graphics Importing & Exporting
      • Image Processing
      • Importing & Exporting
      • Listing of All Formats
      • Raster Image Formats
    • Tech Notes
      • Importing Graphics and Sounds
      • Exporting Graphics and Sounds

WebP (.webp)

  • Import and Export support the WebP format.
  • Import and Export support Exif 2.3 and XMP metadata standards.

Background & Context

    • Registered MIME type: image/webp
    • WebP raster image format.
    • Binary format.
    • Stores both static and animated images.
    • Stores color bitmaps at a resolution of 8 bits per channel.
    • Supports alpha channels.
    • Introduced in 2010 by Google to provide both lossy and lossless compression of images on the web.

Import & Export

  • Import["file.webp"] imports a WebP file, returning a single Image object or a list of images.
  • Import["file.webp",elem] imports the specified element from a WebP file.
  • The import format can be specified with Import["file","WebP"] or Import["file",{"WebP",elem,…}].
  • Export["file.webp",expr] exports the expression expr to WebP.
  • The expression expr can be any of the following:
  • imagean Image expression
    graphicsrasterized graphics
    expran arbitrary expression, rasterized
    {expr1,expr2,…}an animation of rasterized expressions
    AnimatedImage[…]an animation of an AnimatedImage frame
    Manipulate[…]an animation of a Manipulate expression
  • When exporting graphics or arbitrary expressions, the resulting image has the same raster size as its displayed form.
  • Image objects are by default exported at their raster size.
  • See the following reference pages for full general information:
  • Import, Exportimport from or export to a file
    CloudImport, CloudExportimport from or export to a cloud object
    ImportString, ExportStringimport from or export to a string
    ImportByteArray, ExportByteArrayimport from or export to a byte array

Import Elements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Rules"list of rules for all available elements
    "Summary"
  • summary of the file
  • Data representation elements:
  • "Data"array of color values
    "Graphics"Graphics object representing an image
    "Image"raster image, given as an Image object
    "Thumbnail"thumbnail of the first image
  • Data representation elements for animated WebP files:
  • "AnimatedImage"data returned as AnimatedImage object
    "GraphicsList"data returned as Graphics objects
    "ImageList"data returned as Image objects
    "ThumbnailList"data returned as thumbnails
  • Import by default uses the "Image" element for a static WebP and "ImageList" for an animated WebP.
  • Import of an animated WebP with element "Image" gives the first frame of the animation.
  • Subelements for data elements can be used with animated WebP files in the form {elem,frame}, where frame can be any of the following:
  • nnth frame
    -ncounts from the end
    n;;mfrom n through m
    n;;m;;sfrom n through m with steps of s
    {n1,n2,…}specific frames ni
  • Advanced Import elements:
  • "AnimationRepetitions"how many times the animation is played before stopping
    "BitDepth"bits used to represent each color channel
    "Channels"
  • the number of color channels
  • "ColorProfileData"embedded color profile, given as a ColorProfileData object
    "ColorSpace"color encoding used in the file
    "DisplayDurations"display durations of animation frames, given in seconds
    "ImageCount"number of frames
    "RasterSize"raster dimensions
    "Summary"
  • summary of the file
  • "SummarySlideView"slide view summary of all frames
  • Metadata class elements:
  • "Exif"formatted Exif (Exchange image file format)
    "XMP"formatted XMP (Extensible metadata platform)
    "MetaInformation"combination of all formatted metadata present in the file
  • Raw metadata, as stored in the file, can be imported using "RawExif", "RawXMP" and "RawIPTC" elements, returned as an association.
  • All Exif tags can be imported individually. Common tags include:
  • "ApertureValue"lens aperture
    "DateTime"image creation date and time
    "ExposureTime"exposure time, given in seconds
    "FNumber"F number
    "FocalLength"actual focal length of the lens, given in millimeters
    "Make"manufacturer of the recording equipment
    "Model"model name or model number of the equipment
    "Software"name and version of the software or firmware of the camera or image input device used to generate the image
  • Derived metadata elements:
  • "CameraTopOrientation"
  • orientation of the camera when the picture was taken
  • "FlashUsed"
  • whether the flash was fired
  • "GeoPosition"
  • latitude and longitude represented as GeoPosition object
  • "GPSDateTime"
  • image creation date and time registered by GPS

Import Options

  • Import options include:
  • IncludeMetaInformationAutomaticmetadata types to import and export
    "ImageTopOrientation"Automaticorientation of the image as stored in the file
    RasterSizeAutomaticdimensions of the image
  • Possible settings for "ImageTopOrientation" are Automatic, Top, Bottom, Left or Right.

Export Options

  • Export options include:
  • CompressionLevel0compression level, given as a number between 0 and 1
    "ImageTopOrientation"Automaticorientation of the image as stored in the file
    IncludeMetaInformationAutomaticmetadata types to import and export
    RasterSizeAutomaticdimensions of the image
  • Export options for animated WebPs:
  • AnimationRepetitionsInfinityhow many times the animation plays before stopping
    "DisplayDurations"Automaticdisplay duration for each frame in seconds
  • "DisplayDurations"->{d1,d2,…} specifies the display durations for each frame in an animated PNG.

Examples

open all close all

Basic Examples  (4)

Import a WebP file:

Summary of an image:

Import a multi-frame WebP:

Export an image to WebP:

Scope  (8)

Import  (2)

Import a static WebP image:

Summary of a WebP image:

Import an animated WebP:

Summary of an animated WebP:

Summary of frames in an animated WebP:

Export  (6)

Export an image to WebP:

Export graphics to WebP:

Export an arbitrary expression that gets rasterized:

Create an animated WebP file from a list of images:

Create an animated WebP file from an AnimatedImage object:

Create an animated WebP from a Manipulate:

Read the number of exported frames:

Note that duplicate frames are stored as one and the display durations are adjusted accordingly:

Import Elements  (33)

Available Elements  (1)

List of available elements:

Data Representation  (12)

"AnimatedImage"  (1)

Import as an AnimatedImage object:

"Data"  (1)

Import the image data:

Construct images of the proper type:

"Graphics"  (1)

Import as a Graphics object:

"GraphicsList"  (2)

Get the data as a list of Graphics objects:

Specify the frames to import:

"Image"  (1)

Import as an Image object:

This is the default import element for a single-frame WebP:

"ImageList"  (3)

Get the data as a list of Image objects:

This is the default import element for animated WebP:

Specify the frames to import:

"Thumbnail"  (1)

Import thumbnail of an image:

Show the elements that can be imported from this file:

"ThumbnailList"  (2)

Import a list of thumbnails of a multi-framed image:

Specify the frames to import:

Metadata  (20)

"AnimationRepetitions"  (1)

Get the number of times the animation is expected to repeat:

"BitDepth"  (1)

Get the number of bits used for representing each color channel:

"CameraTopOrientation"  (1)

Get the camera orientation at the capture time:

"Channels"  (1)

Get the color encoding used on export:

"ColorSpace"  (1)

Get the color encoding used on export:

Use ImageColorSpace to get the color space of an imported image:

"DateTime"  (1)

Get the date and time that the image was captured:

"Exif"  (3)

Get Exif metadata:

Extract an individual tag from the association:

Individual Exif tags can also be imported directly:

Some Exif tags are processed to give more detailed information:

Compare with the raw "FlashInfo" tag:

"DisplayDurations"  (1)

Get the duration of each frame in the animations:

"FlashUsed"  (1)

Import a tag that shows whether the flash fired:

"FlashUsed" is a subelement of the "FlashInfo" element:

Extract "FlashUsed" from the full "Exif":

"ImageCount"  (1)

Get the number of frames:

"MetaInformation"  (1)

Get all the metadata:

"RasterSize"  (1)

Get the dimensions of the image stored in the file:

Use ImageDimensions on an imported image gives the same result:

"RawExif"  (1)

Import raw Exif data:

Raw Exif tags return the actual values stored in the file:

When importing "Exif", most tags are processed:

"RawXMP"  (1)

Import unprocessed XMP metadata:

"RedEyeCorrection"  (1)

Check whether a red-eye correction was performed:

"Summary"  (1)

Get the image summary:

"SummarySlideView"  (1)

Get the image frames' summary:

"XMP"  (1)

Get XMP metadata:

Extract the XMP "BasicSchema" metadata:

Import Options  (5)

"ImageTopOrientation"  (1)

By default, images are imported with the top orientation:

Specify the side that is supposed to be on the top:

The correct orientation can also be achieved by rotating the image to be upright:

IncludeMetaInformation  (3)

By default, all available metadata is imported:

Possible classes of metadata for JPEG files are "Exif" and "XMP":

Import the image with no metadata:

Import the image with "XMP" metadata only:

RasterSize  (1)

By default, images are imported in their full resolution:

Specify the raster size of the imported WebP image:

Export Options  (7)

AnimationRepetitions  (1)

By default, animation is set to be repeated infinitely:

Specify the number of repetitions:

CompressionLevel  (1)

By default, no compression is used during export:

A larger CompressionLevel can decrease the file size:

Notice the decreased quality of the exported image:

Compare the change in file size and quality difference using different compression levels:

"DisplayDurations"  (2)

By default, a fixed duration is used for all frames:

Specify the duration of each frame:

Duplicate frames are combined and the frame duration is adjusted accordingly:

"ImageTopOrientation"  (1)

By default, the upright image is exported using "ImageTopOrientation"->Top:

Specify the raster size of the exported image:

IncludeMetaInformation  (1)

By default, all existing metainformation is exported:

Export no metadata:

RasterSize  (1)

By default, the image is exported in the full resolution:

Specify the raster size of the exported image:

See Also

Import  Export  CloudExport  CloudImport

Formats: PNG  GIF  JPEG  BMP  PBM  TIFF  ICC

Tech Notes

    ▪
  • Importing Graphics and Sounds
  • ▪
  • Exporting Graphics and Sounds

Related Guides

    ▪
  • Graphics Importing & Exporting
  • ▪
  • Image Processing
  • ▪
  • Importing & Exporting
  • ▪
  • Listing of All Formats
  • ▪
  • Raster Image Formats

History

Introduced in 2014 (10.0) | Updated in 2016 (11.0) ▪ 2020 (12.1) ▪ 2021 (12.3) ▪ 2021 (13.0) ▪ 2022 (13.2)

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Player
  • Wolfram Engine

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2025 Wolfram
© 2025 Wolfram | Legal & Privacy Policy |
English