tinify / wordpress-plugin
Speed up your website. Optimize your JPEG, PNG, and WebP images automatically with TinyPNG.
Installs: 809
Dependents: 0
Suggesters: 0
Security: 0
Stars: 92
Watchers: 10
Forks: 36
Open Issues: 10
Type:wordpress-plugin
Requires
- php: >=5.3.0
- composer/installers: ~1.0
Requires (Dev)
- facebook/webdriver: 1.1.3
- mikey179/vfsstream: ~1.5
- mockery/mockery: ~0.9
- phpdocumentor/reflection-docblock: ~2.0
- phpunit/phpunit: ~4.6
- squizlabs/php_codesniffer: ~2.2
- symfony/yaml: ~2.8
- tinify/tinify: dev-create-key
- wp-coding-standards/wpcs: 0.11
This package is auto-updated.
Last update: 2024-11-18 07:39:13 UTC
README
TinyPNG - JPEG, PNG & WebP image compression for WordPress
Make your website faster by optimizing your JPEG, PNG, and WebP images.
This plugin automatically optimizes your images by integrating with the popular image compression services TinyJPG and TinyPNG. You can download the plugin from https://wordpress.org/plugins/tiny-compress-images/.
Learn more about TinyJPG and TinyPNG at https://tinypng.com/.
Contact us
Got questions or feedback? Let us know! Contact us at support@tinypng.com.
Information for plugin contributors
Prerequisites
- A working Docker 1.12+ and Docker Compose installation (https://docs.docker.com/installation/).
- Composer (https://getcomposer.org/download/).
- PhantomJS 2.1 or greater (http://phantomjs.org).
- MySQL client and admin tools.
Running the plugin in WordPress
- Run
bin/run-wordpress <version>
. E.g.bin/run-wordpress 60
. - Connect to Wordpress on port
80<version>
(e.g. port8060
).
Running the unit tests
- Run
bin/unit-tests <optional path to file>
.
Running the integration tests
- Install Docker 1.12 and docker-compose.
- Run
bin/integration-tests <version>
. E.g.bin/integration-tests 60
.
Check if the code follows WordPress standard
- Run
bin/check-style
to make sure there are no errors.
Test XML-RPC code
WordPress can either be used via the web interface or through the official WordPress apps for mobile devices. WordPress uses XML-RPC internally to communicate between the app and the WordPress admin. Make sure therefore that when developing functionality that is linked to functionality available in the mobile app that it also works over XML-RPC.
Translating the plugin
Language packs will be generated for the plugin once translations for a language are 100% filled in and approved.
See https://translate.wordpress.org/projects/wp-plugins/tiny-compress-images.
For development you may create .po and .mo files for a each language. The .mo files can be created with gettext. Install gettext and generate the .mo language file do the following:
- Install gettext for example run
brew install gettext
. - Add a link msgfmt
ln -s /usr/local/Cellar/gettext/0.19.7/bin/msgfmt ~/.bin
. - Generate the .mo files
bin/format-language-files
.
When finished modifying, you can upload the changes to the SVN trunk. Within roughly 15 minutes WordPress will be updated and allow to add missing translations before publishing the new plugin release.
License
Copyright (C) 2015-2023 Tinify B.V.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.