Docs | imagemash.io
DashboardSign up for Free
  • 🎉imagemash.io
  • 🚀Getting Started
    • Simple CDN Link Usage
  • 💽Sources
    • IM Cloud Storage
    • Image URL
    • Storage Providers
      • Amazon S3
      • Google Cloud
      • S3 Compatible Storage
    • Web Folder
  • 🖼️Image Transform
    • Transform Options
      • Quality
      • Width
      • Height
      • Scale
      • Crop
      • Gravity
      • Background
      • Border
      • Round
      • Output Format
      • Angle (Rotate)
      • Flip
      • Helpers
        • x, y
      • Filters
        • Tint
        • Flatten
        • Grayscale
        • Blur
        • Sharpen
        • Median
        • Threshold
        • Negative
    • Transform Cheat Sheet
    • Named Transforms
  • 🛠️API
    • API - Good to knows
    • API Methods
      • Account
        • Named Transforms
          • Get named transforms
          • Add named transform
          • Remove named transform
        • Image URL Restriction
          • Get keyword list
          • Add keyword to list
          • Remove keyword from list
          • Change keyword list usage
      • Storage
        • Upload file
        • Get and search files
        • Delete files
        • Add new tags to files
        • Set tags of files
        • Remove tags from files
        • Purge Cache
      • Optimize / Transform
  • ❓How it works?
    • Custom Domain
    • Bandwidth
    • Cloud Storage
    • Caching
    • Purge Cache
    • Limits
  • Contact Us
Powered by GitBook
On this page
  1. Image Transform
  2. Transform Options

Output Format

outputFormat - f - f_<output format>

PreviousRoundNextAngle (Rotate)

Last updated 2 years ago

Value
Type
Description

output format

string

Default Value: webp

Value can be;

  • webp, png, jpg, jpeg, avif, gif

Eg. f_webp, f_png, ...

Sets the output format of the image.

You may lose transparency when getting certain types of image formats. Transparent pixels become black when transparency is lost.

sjpg

Smart jpg/png transformation. Detects transparency in the image. If transparency is found in the image, the output format will be set to png. Otherwise, the output format will be set to jpg.

(smart jpg-png conversation)

Use & functions before changing the format to adjust the background color. Also consider that you may not need to change the format to jpg, since the alpha layer is gone by applying Flatten function.

🖼️
Flatten
Background
sjpg
https://demo.imagemash.io/w_400/green_view.png
https://demo.imagemash.io/w_400,f_png/green_view.png
https://demo.imagemash.io/w_400,f_jpg/green_view.png
https://demo.imagemash.io/w_400,flatten,bg_skyblue,f_jpg/green_view.png