Comments (6)
Ah cool! I tried this some days ago, back than it was only working with the node server running. I will check it out with the newest beta build. I also checked the release notes but did not found any hint that this will work.
from astro-imagetools.
could you generate it as an astro file and copy as manifest on your build command? a bit of a hack but...
from astro-imagetools.
@franzwilding there's actually a way to do this. Create a manifest.webmanifest.js
file inside the src/pages
directory and paste the following code:
import Icon48 from "../assets/logo.png?w=72&format=png";
import Icon72 from "../assets/logo.png?w=72&format=png";
import Icon96 from "../assets/logo.png?w=96&format=png";
import Icon144 from "../assets/logo.png?w=144&format=png";
import Icon168 from "../assets/logo.png?w=168&format=png";
import Icon192 from "../assets/logo.png?w=192&format=png";
const manifest = {
icons: [
{
src: Icon48,
sizes: "48x48",
type: "image/png",
},
{
src: Icon72,
sizes: "72x72",
type: "image/png",
},
{
src: Icon96,
sizes: "96x96",
type: "image/png",
},
{
src: Icon144,
sizes: "144x144",
type: "image/png",
},
{
src: Icon168,
sizes: "168x168",
type: "image/png",
},
{
src: Icon192,
sizes: "192x192",
type: "image/png",
},
],
};
export async function get() {
return {
body: JSON.stringify(manifest),
};
}
from astro-imagetools.
Thanks @RafidMuhymin, however I think this would render and return webmanifest live using the node server. I'm trying to find a similar solution, but during build time.
from astro-imagetools.
@franzwilding this works in build too. Astro supports this feature since v0.23
. The problem is this feature is not documented very well. https://docs.astro.build/en/core-concepts/astro-pages/#non-html-pages
from astro-imagetools.
@franzwilding closing this issue now. Feel free to comment on this issue or ask in the Discord channel if you are facing any kind of problems related to Astro.
from astro-imagetools.
Related Issues (20)
- Object hash not working HOT 2
- photos give 404 error in SSR
- 404 images for Astro@v2 HOT 2
- astroImageTools failing only inside a docker container, with no usefull trace or error
- Image shaking on chromium-based browsers HOT 1
- Check for `isSsrBuild` is incorrect HOT 2
- could not find astro-imagetools in VSCode IDE HOT 5
- Disable tracedSVG preview if the source image format is unsupported?
- Incorrect documentation for BackgroundPicture
- Condition of this code
- Cannot read properties of null (reading 'slice')
- Cloudflare Pages - Segmentation fault; command exited with code: 139 HOT 3
- Dynamic ESM import?
- What is Regular Image Optimization?
- Is dynamic import even possible? HOT 3
- Image Detail Modal
- bug: astro-imagetools crashing the serverless function with vercel adapter HOT 1
- How to remove default styles from image? HOT 5
- Astro 3.2: Top-level await is not available in the configured target environment
- Can't syle with CSS HOT 10
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 astro-imagetools.