question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue while building App with small Background Images

See original GitHub issue

To 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:closed
  • Created 6 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
astroamecommented, Nov 3, 2019

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 copy favicon.256x256.png and paste it in the same folder, repeat this step again to have two copies of the favicon.256x256.png image, then rename both copies to sort_asc.9326ad44ae4bebdedd14.png and sort_asc_disabled.d7dc10c78f23615d3285.png (This name should be same as the two sort_asc_ images in the dist folder)

  • Now run, npx electron-builder build --windows

  • DONE!! it should build successfully without error

1reaction
TomTomBcommented, Mar 20, 2018

Well, I have found a solution.

Inside electron-builder.json under win and mac and linux change the "icon": "dist" to "icon": "dist/icons" Now build the project with npm run build:prod. Inside the dist folder create a new folder called icons. Now simply cut all the icon files from the dist folder and past them into your dist/icons folder. Now run npx electron-builder build --windows ( or --mac / --linux) and everything works fine.

Hopefully there is a simpler solution to this issue.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found