简体   繁体   English

如何压缩导入的图像?

[英]How do I compress imported images?

I've recently imported blog posts from blogger to a wordpress site. 我最近将博客作者中的博客文章导入了wordpress网站。

Google page speed is telling me these images should be losslessly compressed. Google页面速​​度告诉我这些图像应该无损压缩。

How do I go about compressing these images if they weren't uploaded by me? 如果这些图像不是我上传的,我该如何压缩?

I have 1000+ of these images that are attached to each post and are not part of my media. 我在每个帖子中都有1000+张这些图片,这些图片不属于我的媒体。

They all have links like this http://4.bp.blogspot.com/-CRkcAeqLqFU/UUA5MUbe8MI/AAAAAAAAKcs/ZGi4LFxQ-nQ/s320/Kelly+Rowland.jpg 他们都有类似这样的链接http://4.bp.blogspot.com/-CRkcAeqLqFU/UUA5MUbe8MI/AAAAAAAAKcs/ZGi4LFxQ-nQ/s320/Kelly+Rowland.jpg

Here's an example page: http://lartmagazine.co.uk/whos-loving-kelly-rowlands-new-video/ 这是一个示例页面: http : //lartmagazine.co.uk/whos-loving-kelly-rowlands-new-video/

Hello to make them losslessly compressed there are few tools you can use if you dont have root right to the webhost. 您好,使它们无损压缩,如果您没有root权限,您可以使用几种工具。

PNGOptimizer - Converts into PNG other lossless image formats (BMP, GIF, TGA). PNGOptimizer-将其他无损图像格式(BMP,GIF,TGA)转换为PNG。

Platform: Windows 平台:Windows

At a tiny 146KB download, PNGOptimizer is the smallest program here, so it's no real surprise that the interface is a little basic. PNGOptimizer仅需146KB的微小下载,它是这里最小的程序,因此该界面有点基本也就不足为奇了。 Or that it concentrates on PNG files. 或者,它专注于PNG文件。

http://psydk.org/PngOptimizer http://psydk.org/PngOptimizer

FileOptimizer Not only can it compress JPG, GIF and PNG images, but it can also work with executable files, archives, Microsoft Office documents, PDF files, and the list goes on. FileOptimizer不仅可以压缩JPG,GIF和PNG图像,而且还可以处理可执行文件,档案,Microsoft Office文档,PDF文件,并且列表可以继续。

http://nikkhokkho.sourceforge.net/static.php?page=FileOptimizer http://nikkhokkho.sourceforge.net/static.php?page=FileOptimizer

Other Way is to check your phpinfo 1) Open notepad 其他方法是检查您的phpinfo 1)打开记事本

2) Write 2)写

<?php phpinfo(); ?>

Save as info.php upload to server and see if you have mod_deflate & GZIP on 另存为info.php,然后上传到服务器,看看是否有mod_deflate和GZIP

then upload to your .htaccess file 然后上传到您的.htaccess文件

    <IfModule mod_deflate.c>
    # html, xml, css, and js:

 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript    application/javascript application/json

    # webfonts and svg:
    <FilesMatch "\.(ttf|otf|eot|svg)$" >SetOutputFilter DEFLATE</FilesMatch>

  </IfModule>

don't forget to add above the image type i am sure that png can be done only jpegs are already compressed. 不要忘记在图像类型上方添加我确定只能完成jpeg压缩的png才能完成。

Have a great day From: Shomron David Hawk-Tech 祝你有美好的一天来自:Shomron David Hawk-Tech

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM