【问题标题】:serving images from S3 and optimize (cache, scale) via pagespeed从 S3 提供图像并通过 pagespeed 优化(缓存、缩放)
【发布时间】:2015-04-03 04:24:04
【问题描述】:

我正在分发大图像并在客户端上调整它的大小。

今天我发现 pagespeed 可以调整图像大小并将其提供给客户。
嗯,听起来不错,但设置起来并不容易。

这就是现在发生的事情。

1. client request page
2. with ajax or json inside the initial page response, image url is provided
3. image url is at aws s3 (or I could set that image url to point to my server and proxy it)

我如何使它如下..

1. client request page
2. ajax
3. image url point to my server
4. upon image request, my server gets the image from s3
5. perform the optimization as if the image was obtained from local (resize, cache)
6. give it to the user

PageSpeed and CDN images
Google mod_pagespeed for ajax loaded content
https://superuser.com/questions/768040/https-proxy-s3-aws-via-nginx-with-pagespeed

https://code.google.com/p/modpagespeed/issues/detail?id=599

似乎指向一个答案,但我很难理解它......

【问题讨论】:

  • 问题解决了吗?
  • @Anatoly:不,暂时放弃..

标签: apache nginx amazon-s3 pagespeed


【解决方案1】:

您只需要 Nginx S3 代理和 Nginx 图片过滤模块:http://nginx.org/en/docs/http/ngx_http_image_filter_module.html

【讨论】:

  • nginx 图像过滤器似乎可以创建特定大小的图像。 pagespeed 似乎通过查看 html 源代码来制作所需大小的图像。 (不过我需要通过 ajax 来完成)
猜你喜欢
  • 1970-01-01
  • 2011-02-22
  • 1970-01-01
  • 1970-01-01
  • 2013-02-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多