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

Kindling: (build bug) - file-loader in our webpack config is corrupting images #32

Open
sync-by-unito bot opened this issue Feb 1, 2024 · 2 comments

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Feb 1, 2024

I am working on STL Sports and used a PNG as a background image in the scss. On build it processed the image and copied it to kindling/build/images but the image was corrupted.

As a temporary fix I commented out the following lines in:

kindling/webpack.config.js

{

test: /.(png|jpe?g|gif)$/i,

use: [

'file-loader',

{

loader: 'image-webpack-loader',

options: {

mozjpeg: {

progressive: true,

quality: 65,

},

pngquant: {

enabled: false,

},

gifsicle: {

interlaced: false,

},

webp: {

quality: 75,

},

},

},

],

},

This effects how pngs, gifs, and jpegs are processed. Honestly I don't know if I've used these image types yet. We've been using SVGs for background images. So maybe this never worked properly. And it's overriding the build-in WordPress webpack config so we might not even need these settings.

┆Issue is synchronized with this Asana task

Copy link
Author

sync-by-unito bot commented Feb 1, 2024

➤ Steve Struemph commented:

My quick fix was to remove these but we should explore if there's benefit to having them... also get to know the default rules that comes with the wordpress config

Copy link
Author

sync-by-unito bot commented Feb 27, 2024

➤ Cullen commented:

The thought here is that we should be including optimized images within the theme.

I vote to remove this from the build.

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

0 participants