Code Monkey home page Code Monkey logo

Comments (3)

etmartinkazoo avatar etmartinkazoo commented on May 12, 2024 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.

leomp12 avatar leomp12 commented on May 12, 2024

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 running astro build twice on production build, first one with static output (reduced paths with getStaticPaths) to transform the images, second one with Node adapter. Copy the compiled images to dist/server/ and create a "manifest" file, on second build I'm not using @astrojs/image source, replacing it with Vite alias to a custom Picture.runtime.astro.

from roadmap.

Princesseuh avatar Princesseuh commented on May 12, 2024

This proposal is now in Stage 3! #500

from roadmap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.