tinify / wordpress-plugin Goto Github PK
View Code? Open in Web Editor NEWSpeed up your WordPress website. Optimize your JPEG and PNG images automatically with TinyPNG.
License: GNU General Public License v2.0
Speed up your WordPress website. Optimize your JPEG and PNG images automatically with TinyPNG.
License: GNU General Public License v2.0
Sometimes it's just easier to do things from CLI. Please consider adding WP CLI commands to:
If the feature is accepted, I'll submit PR (I need to clean up my code before I do it, so I don't want to invest time into something that might be rejected).
When someone gets a chance, could they please submit this to Packagist? Thanks!
Hi, It happen sometimes that plugin process stop with server errors (timeout or anyother).
In theese cases the plugin consider as optimized the image where error happen.
Is it possible to force optimization after first run?
I think it'll be usefull if a user choose to resize original images to re-process all images
Thank you in advance
Stefano
As the Tinify API now supports converting images to webp, it would be nice to also have that in the plugin.
As a first step converting the images would be sufficient, for my workflow simply generating webp files with every optimized file would be perfect and all that is needed. A checkbox in the settings: Generate webp and if checked here we go:
Lets say i use png images, a file called image.png should be optimized and saved as usual, after that we can simply add a conversion step call the API and generate image.png.webp
The serving of the file can be done via rewrite rules in .htaccess or nginx config as a first step.
That would be wonderful for all of us currently struggling with other optimization plugins which will never reach the quality of the tiny panda :-) I would be glad to also code parts of it, if needed.
Hi I love TinyPNG/JPG but there are still 2 things that I am not 100% satisfied about.
webpagetest.org
sometimes shows that some images can be optimized further by 0.2kb to 0.3kb. It kind a feel bad.So, I think the following task list will be proper for this feature request:
Please provide an option to keep EXIF data untouched even when compressing original
The plugin covers basic functionality. However, as a developer, I sometimes need to do custom tasks that aren't covered by the plugin (for example, I wrote WP CLI wrapper around the plugin). Compression is currently triggered during various events, but it seems there's no easy way to execute it manually from standalone PHP code. I propose to add Tiny_Plugin::compress()
. Ideally, for consistency reasons, all other compression methods should rely on and call it:
Tiny_Plugin::compress_on_upload()
,Tiny_Plugin::compress_image_from_library()
,Tiny_Plugin::compress_image_for_bulk()
I can submit PR if this feature request is accepted.
When this plugin is installed via Composer, it is installed to wp-content/plugins/wordpress-plugin
because of the repo name.
In the plugin-created Compression column of my media library I'm getting the following notice for PDFs and some other custom file types:
Undefined index: file in ..\tiny-compress-images\src\class-tiny-image.php on line 48
I assumed that this issue occurs because parse_wp_metadata()
isn't checking if this
is of the allowed file types before moving forward (assuming of course the allowed file types will have 'file' set), it seems only to check that $this->wp_metadata
be an array.
I thought of adding isset($this->wp_metadata['file'])
to line 45 but I end up breaking has_been_compressed()
among other things...
PHP Parse error: syntax error, unexpected '[' in - on line 13
Currently there is only one option i.e. to bulk optimize the image. Can we add configuration to add image resolution (i.e > =1200px) or size (i.e >= 200kb) condition on it?
wordpress-plugin/src/class-tiny-notices.php
Line 134 in fdb99db
I am getting my site ready for 7.2 because of the performance benefits and I noticed that tiny png was throwing an error running wp phpcompat 7.2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.