响应式网站中的云中的动态图像大小调整 [英] Dynamic image resizing in the Cloud for Responsive website

查看:345
本文介绍了响应式网站中的云中的动态图像大小调整的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个响应式(RWD)网站,可以在移动设备上正常工作。我的问题是,图片是在智能手机上的沉重,而在旧手机上无用的。
我知道有很多工具可以离线或在线(例如: http://www.resizeyourimage.com / )调整图片大小,我知道我可以滚动我自己的图像缩放器GD和类似的(PHP在这里),但我想知道如果有人在这里知道一种方法来自动调整图像大小。
例如,通过某种代理,例如:

I have a responsive (RWD) website which works OK on mobile devices. My problem is that pictures are sort of "heavy" on smartphones and uselessly large on older phones. I know there are plenty of tools either offline or online (such as: http://www.resizeyourimage.com/) to resize pictures and I know I could roll my own image resizer with GD and the like (PHP here), but I was wondering if someone here is aware of a way to have images automatically resized. For example by piping them through a proxy of some kind, such as:

http:// cloudservice / w_320 / http:// myserver / mypic。 jpg/>

http://cloudservice/w_320/http://myserver/mypic.jpg" />

免费服务非常喜欢。

我希望我的问题有意义...

I hope my question makes sense...

推荐答案

您应该查看 WURFL Image Tailor 。$ b $你可以通过这样的代理来引用图像:

You should check out WURFL Image Tailor. Works pretty much as you describe. You refer the images through a proxy like this:

    <img src="//wit.wurfl.io/[full-url-to-your-image]">

代理将检测用户代理的屏幕大小,并相应地调整图像大小此服务还采取一些参数,允许您明确设置高度,宽度和百分比的屏幕尺寸。

The proxy will then detect the screen size of the user-agent and resize the image accordingly. This service also take some arguments that allows you to explicitly set height, width and percentage of screen size.

这篇关于响应式网站中的云中的动态图像大小调整的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆