Comments (3)
This is great, thank you for all of your work. In my mind nailing the image story is critical as it is one of the most difficult parts of building for the web that is so often overlooked.
In the meantime, I hope that issue 6010 can get resolved. I was really looking forward to using a combination of SSG and SSR post 2.0 on a few sites with prerender but cannot until this issue is resolved. I'd love to offer a hand to help.
from roadmap.
Are there any downsides to adding dimensions to the output image filename?
/_astro/my_image.640_960.hash.webp"
?
Transforming images on SSR is always bad, just adding sharp to function dependencies increases cold start noticeably 😬
I'm considering compiling a static version first especially for compiling the images, I would use a wrapper with some adaptations for <Image>
and <Picture>
, move the compiled images and then build and deploy with SSR.
I can read the dimensions picture by picture, but it would be much simpler if it was already in the filename, and I think this could be useful in other ways as well. Wdyt?
Update
My bad, it's necessary just a bash line to list images with respective sizes...
And yes, at least for Firebase Functions prevent publishing
@astrojs/image
has a really considerable great impact.
If someone is interested I'm runningastro build
twice on production build, first one with static output (reduced paths withgetStaticPaths
) to transform the images, second one with Node adapter. Copy the compiled images todist/server/
and create a "manifest" file, on second build I'm not using@astrojs/image
source, replacing it with Vite alias to a customPicture.runtime.astro
.
from roadmap.
This proposal is now in Stage 3! #500
from roadmap.
Related Issues (20)
- CSS Inlining HOT 4
- Add a stylesheet feature to the sitemap integration
- Assets: Request for Stricter `getImage()` Attributes HOT 1
- Unable to pass variable from the configuration (integration) to (static file) endpoint HOT 7
- Production Dependencies HOT 6
- Allow framework components to stream responses or run in parallel HOT 6
- Support for partials HOT 26
- Incremental Builds HOT 7
- Built-in SVG components HOT 2
- First-party support for a Picture component HOT 9
- i18n routing HOT 19
- Integration hooks for middleware HOT 4
- Support prefetch in core HOT 1
- CSRF Protection #471 HOT 1
- Improved env handling HOT 59
- env variables aren't populated even though process.env exists HOT 12
- CSS `define:vars` should only add definitions to top-level components HOT 4
- Images are not collected in Markdown files when using HTML syntax HOT 1
- Rerouting HOT 1
- Actions HOT 8
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 roadmap.