Comments (5)
Thanks @onderceylan!
from pwa-asset-generator.
Hi @djmtype, that's already possible in the current version. You can either use CSS background URLs or your custom HTML inputs to accomplish that.
Examples;
# Option 1
pwa-asset-generator icon.svg ./assets -b "url(https://wallpapercrafter.com/sizes/2560x1440/10631-starry-sky-stars-space-dark-astronomy-4k.jpg) no-repeat center center fixed"
# Option 2
pwa-asset-generator icon-with-custom-bg.html ./assets
from pwa-asset-generator.
@onderceylan The one thing I wanted to mention, in order to use Option 1, I couldn't reference an image relative to my project. It's required the url address needs to be from full url address? So using url(/public/bk.jpg)
or url(./public/bk.jpg)
or url(public/bk.jpg)
didn't work in any case.
from pwa-asset-generator.
That's right. It has to be a remote URL, or a local web server URL in your machine. If you really need to use relative path, best option would be doing that with your own html input. It provides so much flexibility including using relative image paths.
from pwa-asset-generator.
best option would be doing that with your own html input.
Exactly, thank you.
from pwa-asset-generator.
Related Issues (20)
- No splash screen shown
- `--no-sandbox` doesn't work, but `-n` or `--noSandbox` does
- error trying to generate assets
- How can I generate only a favicon.ico?
- script tags are reformatted which breaks CSP sha hashes
- Consider supporting `resolution: Ndppx` media query instead of `-webkit-device-pixel-ratio: N`
- Add monochrome icons for Android
- Splash screens for current 10.9” iPad and iPad Air not generated HOT 1
- Custom device configuration
- A way to pass in a custom background image HOT 1
- Is there a way to only output one icon? Also, is there a way to take multiple inputs? HOT 2
- Splash screen not generated for 6th gen iPad mini HOT 1
- Put custom iOS support behind a flag HOT 3
- Next major versions of PWA Asset Generator
- splash screen resize missing Aspect-mode fill, which auto crops the image into different sizes HOT 1
- splash screen generation supports background image with crop mode HOT 1
- generateImages() function does not return a Promise
- The contents of links' href attributes are encoded
- When running with -p "0px" option I get icon size 192x196, 512x516 instead of 192x192, 512x512 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pwa-asset-generator.