Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIFF support #123

Open
cotheq opened this issue Oct 1, 2020 · 0 comments
Open

TIFF support #123

cotheq opened this issue Oct 1, 2020 · 0 comments

Comments

@cotheq
Copy link

cotheq commented Oct 1, 2020

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"),
                    },
                },
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant