left and right align image relatively to canvas:
but top and bottom align canvas relatively to image:
one of these is wrong.1 votecompleted · AdminAndries Louw Wolthuizen (Webmaster, Images.weserv.nl - Image cache & resize proxy) responded
You are right! Solved it, see https://github.com/andrieslouw/imagesweserv/commit/0d59a51529133510db676882d246921d073096ad
Thanks for noticing!
https://images.weserv.nl/?url=i.imgur.com%2F7Wc71ci.jpg "Error 521"
the origin image "http://i.imgur.com/7Wc71ci.jpg" exists, but cache failed, please help1 votecompleted · AdminAndries Louw Wolthuizen (Webmaster, Images.weserv.nl - Image cache & resize proxy) responded
We had some issues, which are solved now.
guilan.ac.ir/gallery//IMG_5371.jpg works fine, but
220.127.116.11/gallery//IMG_5371.jpg doesn't work
both of them are one picture on one server
this is an example, i tested several other sites and problem exist1 votecompleted · AdminAndries Louw Wolthuizen (Webmaster, Images.weserv.nl - Image cache & resize proxy) responded
The changes required to fix this behaviour are done. IPv4 and IPv6 addresses will work now.
Thank you for the patience!
Commits to code:
Please disallow robots to index images. You could also create a subdirectory, for example http://images.weserv.nl/norobots/?url=...
It's very important because webhosters could not change this value in their own robots.txt for external images.1 vote
Excellent suggestion, thanks! I’ve made a few changes, the updated robots.txt will be pushed to all servers shortly.
I like your service very much!
Could you please add a parameter for encoding?
Example: &encoding=base64 returns the base64_encode($image) string.
Thats very useful for embedding images directly. And the string is cached via Cloudflare. So it's fast and efficient.
Wrote the code, please help by testing it.
This will return a string which can be used directly in the src= of a <img>-tag:
Let me know if you run into any problems, thanks!
For example &fnr or $encoding are very important parameters for the official documentation ;)1 vote
Updated the documentation, it may take some time to propagate to all servers.
Make it possible to define if the image should be resized over its original dimensions:
- returns an 200w 150h image
- returns an 800w 600h image
- will return an 400w 300h so the image won't over-scale.
In short: if the 'upto' parameter is set and the defined width/height are bigger than the dimensions of the original, return the image in it's original dimensions.2 votes
I’ve modified the proxy, you can use “t=fitup” to force resizing.
- This returns an image which is the size of the original image (t=fit)
- This returns an image which is 800 by 600 (t=fitup)
So t=fit is the same as your proposed “upto”, and t=fitup is with overscaling. t=absolute will always scale up, as will t=square.
The default behaviour of the proxy is unchanged, and stays t=fit.
You are caching the images. But how long? When does the server refresh images?
Example: Image chached, original image deleted. Does the server output the image after some time?
The image will be deleted eventually, but there are a lot of different caches. I expect it to be deleted between 14 and 60 days, depending on the amount of requests an image gets.
Images that are getting almost none requests will be deleted sooner.
The server will only initiate a refresh when all caches have expired, and only when the image is still being requested by end users.
I'm developing book-based social networking service.
Can you open your source to our company to use 'images.weserv.nl' internally?
if there is any terms and conditions to use your source code, let me know.
My email is email@example.com
thanks in advance.
I’ve sent you an email with the source code.
I've noticed when using weserv as a HTTPS wrapper, it somehow decides to redirect the browser which breaks the green lock (mixed content warning).
I suggest the default behavior is never to redirect the user.
Here is the link.1 vote
Added the parameter &fnr
This forces all possible redirects to return error 404, no matter if you access the proxy over HTTPS or not.
Please let me know if you run into problems.
I modified the effect to your requirements, is this like you want it?
I’d like to hear from you!
Added basic support for unicode characters: http://images.weserv.nl/?url=upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Piktogramm_Verbot_%DF.svg/500px-Piktogramm_Verbot_%DF.svg.png
Or copy-paste this to the browser:
IDN-domains are (mostly) supported:
IDN-TLD’s cannot be implemented at this moment ( http://en.wikipedia.org/wiki/Internationalized_domain_name#Top-level_domain_implementation ).
I’d like to know if this is what you want, please give me info about URL’s that dont work.
url 1: https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-frc3/486362_574580832586511_1342350572_n.jpg
url 2: http://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-frc3/486362_574580832586511_1342350572_n.jpg
Error 404: https://images.weserv.nl/?url=ssl:fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-frc3/486362_574580832586511_1342350572_n.jpg
OK: https://images.weserv.nl/?url=fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-frc3/486362_574580832586511_1342350572_n.jpg1 vote
Sorry, someone made a coding error in handling SSL-connections, solved the error!
“?url=ssl:” should work again now!
This image was uploaded from a mobile device. The browser rotates it automatically:
Resized by your servers, its turned sideways.
Is there a way to fix that?1 vote
Browsers like Chrome rotate such images, relying on the EXIF-parameter “Orientation”.
I modified the code of images.weserv.nl, so from now on such images will be rotated automatically to the right position before processing them further.
Keep in mind that, while I emptied some caches, this affects only the images processed from now on. Older images/thumbnails reside up to 30 days in cache, before they get regenerated
For example, these URL’s show the new code in action:
Let me know if this is what you wanted!
I added the parameter &il
This will add interlacing to GIF and PNG. For JPEG it will add progressive rendering of the resulting image.
If this is what you want, I will update the documentation on images.weserv.nl shortly.
Please let me know if there are any problems.
This url: statik.tempo.co/?id=164903 returns Error 4041 vote
Error resolved, cause unknown, seems like a bit fell over.
It would be great if we can self-host this. Is it open source?1 vote
The image proxy is free for use to anyone, and we offer it as-is, it’s just basic image resizing, available to anyone, easy to use. We try to keep everyone as happy as we can.
If you’re however interested in running the source code yourself, and use the service internally, please e-mail me on postmaster at weserv dot nl. The code isn’t open source, as in, open for everyone, but we do let company’s run it internally, which is evaluated on a case-by-case basis. The whole system is written in PHP, uses an file-based caching system, and on top of that utilizes normal HTTP reverse proxy’s to perform well under excessive load.
I hope to have answered your question.
By url encoding all parameters:
Or, example with resizing:
Wrote an implementation for your idea, would you please test this option for me?
I added the parameter “&trim”, with the option of setting the sensitivity. Default this sensitivity is 10.
The sensitivity defines how black/white/etc the borders must be. For example: your image has a colored border ranging from #000000 (pitch black) to #0F0000.
Example with default sensitivity:
Example with sensitivity of 20:
Example with a lot of other options, and a sensitivity of 20:
Any comments are welcome!
If the images were modified, does the proxy will refresh it after a certain period of time? Thanks.1 vote
The proxy caches images in different ways, depending on the rate of requests, no more than 31 days, and at least 14 days. Most images refresh every 14 days.