-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Images not getting compressed #2935
Comments
I don't believe the cli handles optimizing images for you |
We do not optimize images currently, no. Anything copied over via the |
But then what these chunks are all about?
|
Those are from stuff referenced in the |
Would love to have my images compressed with a production build |
@filipesilva i want to ask you something about angular-cli, I am new with angular-cli and i remember when i was working with angular2+systemjs that i could load programmatically some modules lazy with something like this: constructor(private loader: SystemJsNgModuleLoader) { } Do you know if there is a method to do something similar with angular-cli ? Sorry for the question in this post but i don't know where is the proper place to post my question, thanks in advance. |
Closing as decisions about image compression/optimization are extremely project specific and there are a veritable cornucopia of tools available to do so based on the specific needs of the project. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
angular-cli: 1.0.0-beta.18 node: 6.2.1 os: darwin x64
I do have a
.png
file in assets folder, and I refer in my CSS asbackground: url(/../../assets/images/Logo_3d.png) no-repeat;
as an inline style.and my webpack output show no png package chunk, So I guess it would be bundled as part of styles chunk.
Asset Size Chunks Chunk Names inline.js 1.47 kB 3 [emitted] inline 674f50d287a8c48dc19ba404d20fe713.eot 166 kB [emitted] b06871f281fee6b241d60582ae9369b9.ttf 166 kB [emitted] fee66e712a8a08eef5805a46892932ad.woff 98 kB [emitted] af7ae505a9eed503f8b8e6982036873e.woff2 77.2 kB [emitted] main.0b7da689dc574a32e9bf.bundle.js 2.91 MB 0, 3 [emitted] main styles.773d32919e284cc33328.bundle.js 284 kB 1, 3 [emitted] styles scripts.85878e10a4d6158213d7.bundle.js 10.2 kB 2, 3 [emitted] scripts 912ec66d7572ff821749319396470bde.svg 444 kB [emitted] main.0b7da689dc574a32e9bf.bundle.map 18.7 MB 0, 3 [emitted] main styles.773d32919e284cc33328.bundle.map 622 kB 1, 3 [emitted] styles scripts.85878e10a4d6158213d7.bundle.map 23.3 kB 2, 3 [emitted] scripts inline.d41d8cd98f00b204e980.bundle.map 13.5 kB 3 [emitted] inline styles.773d32919e284cc33328.bundle.js.gz 40.5 kB [emitted] main.0b7da689dc574a32e9bf.bundle.js.gz 663 kB [emitted] index.html 615 bytes [emitted]
But when I access my site by running in prod mode.
ng serve --prod
I still see the image rendered in original size of420kb
.Doesn't the webpack take care of image compression? May be is this Intentional?
The text was updated successfully, but these errors were encountered: