Skip to content

Commit

Permalink
Запрещает преобразования для SVG
Browse files Browse the repository at this point in the history
  • Loading branch information
monochromer committed Oct 6, 2023
1 parent 1e84882 commit 1dd992c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,10 @@ module.exports = function(config) {
const fullImagePath = path.join(articleSourceFolder, image.src);
const imageStats = await Image(fullImagePath, {
widths: ['auto', 600, 1200, 2400],
formats: ['webp', 'auto'],
formats: ['svg', 'webp', 'auto'],
outputDir: outputArticleImagesFolder,
urlPath: 'images/',
svgShortCircuit: true,
filenameFormat: (hash, src, width, format) => {
const extension = path.extname(src);
const name = path.basename(src, extension);
Expand Down

0 comments on commit 1dd992c

Please sign in to comment.