Skip to content

TIFF support #123

Open
Open
@cotheq

Description

@cotheq

Sharp does support tiff but browser doesn't. Please add tiff support for source images with force convertion to jpg, png and webp.
For example, I added this to node_modules/responsive-loader/lib/utils.js:

const MIMES = {
  //all the rest mime types,
  tif: "image/tiff"
};
const EXTS = {
  //all the rest exts,
  "image/tiff": "tif"
};

and some rules to webpack.config.js:

{
                test: /\.(jpe?g|webp|tif)$/i,
                use: {
                    loader: "responsive-loader",
                    options: {
                        //any other options,
                        format: "jpg",
                        adapter: require("responsive-loader/sharp"),
                    },
                },
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions