Function getOutputExtension

  • Returns the output file extension for a given image format is needed because the mozjpeg compressor needs to be saved with the jpg extension and to avoid the jpeg extension being added to the output file when saving a jpeg file

    Parameters

    • compressor: Compressor

      The image format

    • originalExt: string

      The original file extension

    Returns string

    The output file extension