Skip to main content

What's the difference between `f_auto` and `f_auto,q_auto`?

Comments

3 comments

  • Stephen Doyle

    Hi,

    The automatic quality and automatic format features perform different tasks, but there's also a note in the documentation about what happens when you use them together: https://cloudinary.com/documentation/image_transformations#automatic_format_selection_f_auto

    To briefly summarise:

    q_auto chooses an encoder quality setting to use that will reduce the file size with minimal impact on visual quality: https://cloudinary.com/documentation/image_transformations#automatic_quality_and_encoding_settings

    f_auto chooses a different format to use based on the formats supported by the browser being used, and which format is used is decided by an algorithm on our side regarding which formats can most efficiently encode typical images: https://cloudinary.com/documentation/image_transformations#automatic_format_selection_f_auto

    When used together, we'll also consider the effect of changing the format on the visual quality, and may choose a different format than the 'usual' format f_auto would pick.

    The most common reason for this is the one mentioned in that note in the documentation, which is related to Chroma Subsampling - some formats like WEBP always perform chroma subsampling, but if we detect that that for the specific image provided, a better result will be obtained by not performing chroma subsampling, we'll use a format like JPEG instead

    At a high level, compared to choosing quality and format settings manually, the use of f_auto and q_auto together should always give better quality at a given file size, or lower file size for the same visual quality

    Regards,

    Stephen

    0
  • Tianqian Zhu

    Thanks Stephen!

    When f_auto is used without q_, how is the quality level decided?

    0
  • Stephen Doyle

    Hi Tianqian,

    If you specify any transformation options (including f_auto), the new image will be created using some default optimizations and including use your account's default quality, unless you specify something more specific (like q_auto, q_70, etc)

    You can see and change our account's default quality settings on the 'upload' tab of the account settings - if you haven't changed it, the defaults are q_90 for JPEG, q_75 for WEB, q_80 for JPEG-XR

    Regards,

    Stephen

    0

Post is closed for comments.