Issue while building App with small Background Images
See original GitHub issueTo reproduce this issue simply change the background image inside home.component.scss into an image thats smaller than 256x256px.
Now try to build the project with npm run electron:windows
.
This will fail with the following Error Message :
image C:\Users\username\angular-electron\dist\small-image.0488d9eb003af2735cd0.png must be at least 256x256
Is there a way to fix this issue? It seems like a strange behavior between the Output generated by ng and the electron-builder who´s maybe trying to use those as App Icons.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Why won't my background image expa… - Apple Developer
Hello,. Working on a really simple learning app. Center and align three button, and have a background image fill the entire screen. However...
Read more >Slow App with Background image - android - Stack Overflow
It is working smoothly when its working on a white background but when i want to put a background image, its becoming slower...
Read more >How to Create a Responsive Background Image With CSS ...
In this tutorial, we'll go over the simplest technique for making a background image fully stretch out to cover the entire browser viewport....
Read more >8 Best Free Apps to Change a Background of a Photo in 2022
If you have apps to change a background in photos, you don't need to become a Photoshop expert. Here are the best background...
Read more >The Fixed Background Attachment Hack - CSS-Tricks
It causes the image to get cut off and gain whitespace around it. iOS has an issue preventing background-attachment: fixed from being used ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have found a simpler solution to this error:
download the latest version of electron-builder v22.1.0
now run,
npm run build:prod
once that is completed, inside the
dist
folder copyfavicon.256x256.png
and paste it in the same folder, repeat this step again to have two copies of thefavicon.256x256.png
image, then rename both copies tosort_asc.9326ad44ae4bebdedd14.png
andsort_asc_disabled.d7dc10c78f23615d3285.png
(This name should be same as the two sort_asc_ images in thedist
folder)Now run,
npx electron-builder build --windows
DONE!! it should build successfully without error
Well, I have found a solution.
Inside electron-builder.json under
win
andmac
andlinux
change the"icon": "dist"
to"icon": "dist/icons"
Now build the project withnpm run build:prod
. Inside thedist
folder create a new folder calledicons
. Now simply cut all the icon files from thedist
folder and past them into yourdist/icons
folder. Now runnpx electron-builder build --windows
( or--mac
/--linux
) and everything works fine.Hopefully there is a simpler solution to this issue.