Images.weserv.nl - General

I suggest you..

(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  1. php api

    <?php
    if( ! class_exists('imagesWeServApi'))
    {
    /**
    * images.weserv.nl API
    */
    class imagesWeServApi
    {
    /**
    * Request image
    *
    * @param string $url link to image
    * @return string
    */
    public static function request($url)
    {
    return preg_replace('/^((https?:)?\/\/)(.+)/i', 'https://images.weserv.nl/?url=\\3', $url);
    }
    }
    }

    // demo:
    imagesWeServApi::request('http://wpdemo.web-dorado.com/wp-content/uploads/photo-gallery/photo%20gallery%20demo/17.jpg');

    1 vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)

      We’ll send you updates on this idea

    • Return default image if the image's URL not found

      Let say if the image from hosting was removed but the image's URL is still in the database, then it will not load the image as the 404 error happens. My idea is, to replace the 404 error with default image so that we will never see the broken image on our website.

      8 votes
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        I agree to the terms of service
        Signed in as (Sign out)

        We’ll send you updates on this idea

      • Remove cached images (by API/manual)

        GIVEN:
        //------------------------------------------------------------------------
        image source (url parametre) is:

        maps.googleapis.com/maps/api/staticmap?sensor=false&size=2048x350&scale=2&maptype=roadmap&zoom=13&markers=color:blue|size:small|1400+Oakton+Street,+Evanston,+IL+60202

        encoded version:

        maps.googleapis.com%2Fmaps%2Fapi%2Fstaticmap%3Fsensor%3Dfalse%26size%3D2048x350%26scale%3D2%26maptype%3Droadmap%26zoom%3D13%26markers%3Dcolor%3Ablue%257Csize%3Asmall%257C1400%2BOakton%2BStreet%2C%2BEvanston%2C%2BIL%2B60202

        I'm using following images.weserv.nl parametres:

        &w=70&t=square&h=70

        final link:

        http://images.weserv.nl/?url=maps.googleapis.com%2Fmaps%2Fapi%2Fstaticmap%3Fsensor%3Dfalse%26size%3D2048x350%26scale%3D2%26maptype%3Droadmap%26zoom%3D13%26markers%3Dcolor%3Ablue%257Csize%3Asmall%257C1400%2BOakton%2BStreet%2C%2BEvanston%2C%2BIL%2B60202&w=70&t=square&h=70

        //----------------------------------------------------------------------------

        ISSUE:

        Some of the "google map images" cached properly, some of them is not (link provided above - final link)

        Looks like when caching process is broken by any internal reason, the "image url" is still remembered as a key in your collection. So there is no way to rebuild correct cache for that "broken" image.

        QUESTION:

        Is any api/way to expire/delete/rebuild/invalidate existing image cache?

        8 votes
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          I agree to the terms of service
          Signed in as (Sign out)

          We’ll send you updates on this idea

        Images.weserv.nl - General

        Feedback and Knowledge Base