GithubHelp home page GithubHelp logo

Comments (3)

JonasKruckenberg avatar JonasKruckenberg commented on July 23, 2024

I agree this would be a useful feature to have.
However, I'm quite stripped for time right now (you can probably tell by the late reply πŸ˜‰) so I will make absolutely no promises as to when I get to this.
Might be days or years, but if you're interested in seeing this soon I'm very happy to accept a PR!

from imagetools.

sawyerclick avatar sawyerclick commented on July 23, 2024

Really interested in this, though I wonder how it could work with multivariant queries. Should imagetools's default be to have image names mirror the queries (favicon_180w_180h.png)? Then if name=custom_name is passed, apply it. I get hung up on how we could tackle multivariant queries for things such as w=1;2;3;4&quality=25;50;100

edit Jan. 8, 2023: I believe the name param should be the base of the new url. If there are no multivariant queries apart from format, the name will be applied directly (e.g. favicon.svg?w=180&h=180&name=apple-touch-icon&png -> apple-touch-icon.png).

If there are multivariant queries, the differences should be applied as is done in the core imagetools tests (e.g. favicon.svg?w=180;192&h=180&name=apple-touch-icon&png -> apple-touch-icon-w_180.png)

from imagetools.

simenandre avatar simenandre commented on July 23, 2024

We should omit the hash when applying a name or provide an option to omit the hash altogether.

I'll leave you with a use-case example:
i.e. a file might end up named hero.a7929d7f.avif, which might be used for OpenGraph/social media. Later, we regenerate the images, and the hash changes, but the post/thread/message is trying to look for hero.a7929d7f.avif (even though it's now called hero.s12x43ac.avif). I don't think LinkedIn, Slack, Facebook and likes are scraping for updated meta tags as much, or if at all?

☝️ This happens on https://github.com/klyngeorg/website, which is re-building every day at noon. I'm not sure what to do with it yet, so this feature would be great :)

from imagetools.

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.