Skip to content

Commit 95d2444

Browse files
committed
Bikeshedding
- Update readme - Remove changelog - Rename LICENSE.md -> LICENSE
1 parent 4558e8f commit 95d2444

File tree

6 files changed

+80
-374
lines changed

6 files changed

+80
-374
lines changed

.gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
/composer.json -export-ignore
1010
/composer.lock -export-ignore
1111
/command.php -export-ignore
12-
/LICENSE.md -export-ignore
12+
/LICENSE -export-ignore
1313
/README.md -export-ignore

.github_changelog_generator

-4
This file was deleted.

CHANGELOG.md

-259
This file was deleted.

LICENSE.md LICENSE

File renamed without changes.

README.md

+78-107
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,52 @@
1-
# typisttech/image-optimize-command
1+
<div align="center">
2+
3+
# Image Optimize Command
4+
5+
</div>
6+
7+
<div align="center">
8+
29

310
[![Packagist](https://img.shields.io/packagist/v/typisttech/image-optimize-command.svg?style=flat-square)](https://packagist.org/packages/typisttech/image-optimize-command)
411
[![Packagist](https://img.shields.io/packagist/dt/typisttech/image-optimize-command.svg?style=flat-square)](https://packagist.org/packages/typisttech/image-optimize-command)
512
![PHP from Packagist](https://img.shields.io/packagist/php-v/TypistTech/image-optimize-command?style=flat-square)
6-
[![CircleCI](https://circleci.com/gh/TypistTech/image-optimize-command.svg?style=svg)](https://circleci.com/gh/TypistTech/image-optimize-command)
13+
[![CircleCI](https://img.shields.io/circleci/build/gh/TypistTech/image-optimize-command?style=flat-square)](https://circleci.com/gh/TypistTech/image-optimize-command)
714
[![codecov](https://codecov.io/gh/TypistTech/image-optimize-command/branch/master/graph/badge.svg)](https://codecov.io/gh/TypistTech/image-optimize-command)
8-
[![GitHub](https://img.shields.io/github/license/TypistTech/image-optimize-command.svg?style=flat-square)](https://github.com/TypistTech/image-optimize-command/blob/master/LICENSE.md)
9-
[![GitHub Sponsor](https://img.shields.io/badge/Sponsor-GitHub-ea4aaa?style=flat-square&logo=github)](https://github.com/sponsors/TangRufus)
10-
[![Sponsor via PayPal](https://img.shields.io/badge/Sponsor-PayPal-blue.svg?style=flat-square&logo=paypal)](https://typist.tech/donate/image-optimize-command/)
11-
[![Hire Typist Tech](https://img.shields.io/badge/Hire-Typist%20Tech-ff69b4.svg?style=flat-square)](https://typist.tech/contact/)
15+
[![license](https://img.shields.io/github/license/TypistTech/image-optimize-command.svg?style=flat-square)](https://github.com/TypistTech/image-optimize-command/blob/master/LICENSE)
1216
[![Twitter Follow @TangRufus](https://img.shields.io/twitter/follow/TangRufus?style=flat-square&color=1da1f2&logo=twitter)](https://twitter.com/tangrufus)
17+
[![Hire Typist Tech](https://img.shields.io/badge/Hire-Typist%20Tech-ff69b4.svg?style=flat-square)](https://www.typist.tech/contact/)
18+
19+
</div>
20+
21+
<p align="center">
22+
<strong>Easily optimize images using WP CLI</strong>
23+
<br />
24+
<br />
25+
Built with ♥ by <a href="https://www.typist.tech/">Typist Tech</a>
26+
</p>
27+
28+
---
29+
30+
**Image Optimize Command** is an open source project and completely free to use.
1331

14-
Easily optimize images using WP CLI.
15-
16-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
17-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
18-
19-
20-
- [Usage](#usage)
21-
- [Requirements](#requirements)
22-
- [Installation](#installation)
23-
- [Optimization tools](#optimization-tools)
24-
- [SVGO and cwebp are optional](#svgo-and-cwebp-are-optional)
25-
- [Use Cases](#use-cases)
26-
- [First use](#first-use)
27-
- [After upgrading WordPress core / plugins / themes](#after-upgrading-wordpress-core--plugins--themes)
28-
- [Restoring the originals](#restoring-the-originals)
29-
- [Migrating from image-optimize-command v0.1.x](#migrating-from-image-optimize-command-v01x)
30-
- [FAQs](#faqs)
31-
- [What kind of optimization it does?](#what-kind-of-optimization-it-does)
32-
- [How to customize the optimization?](#how-to-customize-the-optimization)
33-
- [How to skip backups / restorations?](#how-to-skip-backups--restorations)
34-
- [Does running `wp image-optimize attachment / batch` multiple times trigger multiple optimization for the same attachments?](#does-running-wp-image-optimize-attachment--batch-multiple-times-trigger-multiple-optimization-for-the-same-attachments)
35-
- [Will the images look different after optimization?](#will-the-images-look-different-after-optimization)
36-
- [Why my GIFs stopped animating?](#why-my-gifs-stopped-animating)
37-
- [Can I use this on managed hosting?](#can-i-use-this-on-managed-hosting)
38-
- [Do I have to install `SVGO` or `cwebp`?](#do-i-have-to-install-svgo-or-cwebp)
39-
- [`PHP Fatal error: Allowed memory size of 999999 bytes exhausted (tried to allocate 99 bytes)`](#php-fatal-error-allowed-memory-size-of-999999-bytes-exhausted-tried-to-allocate-99-bytes)
40-
- [Does it have a limits or quotas?](#does-it-have-a-limits-or-quotas)
41-
- [Is it for everyone?](#is-it-for-everyone)
42-
- [Will you add support for older PHP versions?](#will-you-add-support-for-older-php-versions)
43-
- [It looks awesome. Where can I find some more goodies like this?](#it-looks-awesome-where-can-i-find-some-more-goodies-like-this)
44-
- [Where can I give :star::star::star::star::star: reviews?](#where-can-i-give-starstarstarstarstar-reviews)
45-
- [Sponsoring :heart:](#sponsoring-heart)
46-
- [GitHub Sponsors Matching Fund](#github-sponsors-matching-fund)
47-
- [Why don't you hire me?](#why-dont-you-hire-me)
48-
- [Want to help in other way? Want to be a sponsor?](#want-to-help-in-other-way-want-to-be-a-sponsor)
49-
- [Running the Tests](#running-the-tests)
50-
- [Feedback](#feedback)
51-
- [Change log](#change-log)
52-
- [Security](#security)
53-
- [Credits](#credits)
54-
- [License](#license)
55-
56-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
57-
58-
WP CLI wrapper for [spatie/image-optimizer](https://github.com/spatie/image-optimizer). **Optimizing `gif`, `jpeg`, `jpg`, `png`, `svg`, `webp` images by running them through a chain of various image [optimization tools](#optimization-tools).** Check this project's [introductory blog post](https://typist.tech/articles/easily-optimize-wordpress-images-using-wp-cli-and-some-binaries/) about why I built it.
32+
However, the amount of effort needed to maintain and develop new features is not sustainable without proper financial backing. If you have the capability, please consider donating using the links below:
33+
34+
<div align="center">
35+
36+
[![GitHub via Sponsor](https://img.shields.io/badge/Sponsor-GitHub-ea4aaa?style=flat-square&logo=github)](https://github.com/sponsors/TangRufus)
37+
[![Sponsor via PayPal](https://img.shields.io/badge/Sponsor-PayPal-blue.svg?style=flat-square&logo=paypal)](https://typist.tech/go/paypal-donate/)
38+
[![More Sponsorship Information](https://img.shields.io/badge/Sponsor-More%20Details-ff69b4?style=flat-square)](https://typist.tech/donate/image-optimize-command/)
39+
40+
</div>
41+
42+
---
43+
44+
**Image Optimize Command** is a WP CLI wrapper for [spatie/image-optimizer](https://github.com/spatie/image-optimizer) which **optimize `gif`, `jpeg`, `jpg`, `png`, `svg`, `webp` images by running them through a chain of various image <a href="https://github.com/spatie/image-optimizer#optimization-tools">optimization tools</a>.** Read [the introductory blog post](https://typist.tech/articles/easily-optimize-wordpress-images-using-wp-cli-and-some-binaries/) about why I built it.
5945

6046

6147
## Usage
6248

63-
```bash
49+
```sh-session
6450
# optimize specific attachments
6551
$ wp image-optimize attachment 123 223 323
6652

@@ -90,6 +76,14 @@ $ wp help image-optimize
9076
$ wp help image-optimize <subcommand>
9177
```
9278

79+
---
80+
81+
<p align="center">
82+
<strong>Typist Tech is ready to build your next awesome WordPress site. <a href="https://typist.tech/contact/">Hire us!</a></strong>
83+
</p>
84+
85+
---
86+
9387
## Requirements
9488

9589
- PHP v7.2 or later
@@ -99,7 +93,7 @@ Since [`wp-cli/wp-cli-bundle` bundles an older version of `symfony/process`](htt
9993

10094
## Installation
10195

102-
```bash
96+
```sh-session
10397
$ wp package install typisttech/image-optimize-command:@stable
10498
```
10599

@@ -123,7 +117,7 @@ Note that `spatie/image-optimizer` only supports Pngquant 2.5 and lower. See: `s
123117
Note that [WordPress doesn't support svg files](https://core.trac.wordpress.org/ticket/24251) out of the box. You can omit [SVGO](https://github.com/svg/svgo).
124118
However, if you have [enabled WordPress svg support](https://kinsta.com/blog/wordpress-svg/?kaid=CGCHYHJJJMMF) and uploaded svg files to WordPress media library, you must install SVGO. Otherwise, the command will fail.
125119

126-
Same goes to cwebp.
120+
Same goes for cwebp.
127121

128122
## Use Cases
129123

@@ -139,7 +133,7 @@ Chances are the thumbnails are missing or never generated:
139133

140134
Simplest solution is to regenerate thumbnails then optimize:
141135

142-
```bash
136+
```sh-session
143137
$ wp media regenerate
144138
$ wp image-optimize batch --limit=9999999
145139

@@ -152,7 +146,7 @@ $ wp image-optimize wp-includes
152146

153147
### After upgrading WordPress core / plugins / themes
154148

155-
```bash
149+
```sh-session
156150
$ wp image-optimize mu-plugins
157151
$ wp image-optimize plugins
158152
$ wp image-optimize themes
@@ -164,7 +158,7 @@ $ wp image-optimize wp-includes
164158

165159
This command backs up the full sized images before optimizing attachments. If you want to restore them:
166160

167-
```bash
161+
```sh-session
168162
# optimize
169163
$ wp image-optimize attachment 123
170164

@@ -178,7 +172,7 @@ $ wp media regenerate 123
178172

179173
Starting from v0.2, this command backs up the full sized images before optimizing attachments. To migrate from image-optimize-command v0.1.x:
180174

181-
```bash
175+
```sh-session
182176
$ wp image-optimize reset
183177
$ wp media regenerate
184178
$ wp image-optimize batch --limit=9999999
@@ -259,7 +253,7 @@ Luckily for you, Lasse M. Tvedt showed [how to stop WordPress from resizing GIFs
259253

260254
### Can I use this on managed hosting?
261255

262-
No, you can't use this on managed hosting such as [Kinsta](http://bit.ly/kinsta-com), [Flywheel](https://typist.tech/go/flywheel) or [WP Engine](https://typist.tech/go/wp-engine) because they prohibit installing the binaries.
256+
No, you can't use this on managed hosting such as [Kinsta](https://typist.tech/go/kinsta), [Flywheel](https://typist.tech/go/flywheel) or [WP Engine](https://typist.tech/go/wp-engine) because they prohibit installing the binaries.
263257

264258
If you must use it on managed hosting, [hire a developer](https://typist.tech/contact/) to add SaaS provider integration:
265259

@@ -279,7 +273,7 @@ If you must use it on managed hosting, [hire a developer](https://typist.tech/co
279273
- uploaded SVGs to WordPress media library
280274
- using the `find` subcommand (or its shortcuts) with `--extensions=svg`
281275

282-
Same goes to cwebp.
276+
Same goes for cwebp.
283277

284278
### `PHP Fatal error: Allowed memory size of 999999 bytes exhausted (tried to allocate 99 bytes)`
285279

@@ -301,76 +295,53 @@ Never! This plugin will only work on [actively supported PHP versions](https://s
301295

302296
Don't use it on **end of life** or **security fixes only** PHP versions.
303297

304-
### It looks awesome. Where can I find some more goodies like this?
298+
### It looks awesome. Where can I find some more goodies like this
305299

306-
- Articles on Typist Tech's [blog](https://typist.tech)
307-
- More projects on [Typist Tech's GitHub profile](https://github.com/TypistTech/)
308-
- More plugins on [TangRufus'](https://profiles.wordpress.org/tangrufus/#content-plugins) wp.org profiles
300+
- Articles on [Typist Tech's blog](https://typist.tech)
301+
- [Tang Rufus' WordPress plugins](https://profiles.wordpress.org/tangrufus#content-plugins) on wp.org
302+
- More projects on [Typist Tech's GitHub profile](https://github.com/TypistTech)
309303
- Stay tuned on [Typist Tech's newsletter](https://typist.tech/go/newsletter)
310-
- Follow [@TangRufus](https://twitter.com/tangrufus) on Twitter
311-
- Hire [Tang Rufus](https://typist.tech/contact) to build your next awesome site
304+
- Follow [Tang Rufus' Twitter account](https://twitter.com/TangRufus)
305+
- **Hire [Tang Rufus](https://typist.tech/contact) to build your next awesome site**
312306

313-
### Where can I give :star::star::star::star::star: reviews?
307+
### Where can I give 5-star reviews?
314308

315-
Thanks! Glad you like it. It's important to let my know somebody is using this project. Since this is not hosted on wordpress.org, please consider:
309+
Thanks! Glad you like it. It's important to let me knows somebody is using this project. Please consider:
316310

317-
- tweet something good with mentioning [@TangRufus](https://twitter.com/tangrufus)
318-
- :star: star this [Github repo](https://github.com/typisttech/image-optimize-command)
319-
- :eyes: [watch](https://github.com/typisttech/image-optimize-command/subscription) this Github repo
320-
- write blog posts
321-
- submit [pull requests](https://github.com/typisttech/image-optimize-command)
322-
- [sponsor](https://github.com/sponsors/TangRufus) Tang Rufus to maintain his open source projects
323-
- hire [Tang Rufus](https://typist.tech/contact) to build your next awesome site
311+
- [tweet](https://twitter.com/intent/tweet?text=Image%20Optimize%20Command%20-%20%40wpcli%20wrapper%20for%20%40spatie_be%20image%20optimizer&url=https://github.com/TypistTech/image-optimize-command&hashtags=webdev,wordpress&via=TangRufus&url=https://github.com/TypistTech/image-optimize-command&hashtags=webdev,wordpress&via=TangRufus) something good with mentioning [@TangRufus](https://twitter.com/tangrufus)
312+
- ★ star [the Github repo](https://github.com/TypistTech/image-optimize-command)
313+
- [👀 watch](https://github.com/TypistTech/image-optimize-command/subscription) the Github repo
314+
- write tutorials and blog posts
315+
- **[hire](https://www.typist.tech/contact/) Typist Tech**
324316

325-
## Sponsoring :heart:
326-
327-
Love `WP Contained Hook`? Help me maintain it, a [sponsorship here](https://typist.tech/donation/) can help with it.
328-
329-
### GitHub Sponsors Matching Fund
330-
331-
Do you know [GitHub is going to match your sponsorship](https://help.github.com/en/github/supporting-the-open-source-community-with-github-sponsors/about-github-sponsors#about-the-github-sponsors-matching-fund)?
332-
333-
[Sponsor now via GitHub](https://github.com/sponsors/TangRufus) to double your greatness.
334-
335-
### Why don't you hire me?
336-
337-
Ready to take freelance WordPress jobs. Contact me via the contact form [here](https://typist.tech/contact/) or, via email [[email protected]](mailto:[email protected])
338-
339-
### Want to help in other way? Want to be a sponsor?
340-
341-
Contact: [Tang Rufus](mailto:[email protected])
342-
343-
## Running the Tests
317+
## Testing
344318

345319
Run the tests:
346320

347-
``` bash
321+
```sh-session
348322
$ composer test
349323
$ composer style:check
350324
```
351325

352326
## Feedback
353327

354-
**Please provide feedback!** We want to make this library useful in as many projects as possible.
355-
Please submit an [issue](https://github.com/TypistTech/image-optimize-command/issues/new) and point out what you do and don't like, or fork the project and make suggestions.
328+
**Please provide feedback!** We want to make this project as useful as possible.
329+
Please [submit an issue](https://github.com/TypistTech/image-optimize-command/issues/new) and point out what you do and don't like, or fork the project and [send pull requests](https://github.com/TypistTech/image-optimize-command/pulls/).
356330
**No issue is too small.**
357331

358-
## Change log
359-
360-
Please see [CHANGELOG](./CHANGELOG.md) for more information on what has changed recently.
332+
## Security Vulnerabilities
361333

362-
## Security
363-
364-
If you discover any security related issues, please email [[email protected]](mailto:[email protected]) instead of using the issue tracker.
334+
If you discover a security vulnerability within this project, please email us at [[email protected]](mailto:[email protected]).
335+
All security vulnerabilities will be promptly addressed.
365336

366337
## Credits
367338

368-
[`image-optimize-command`](https://github.com/TypistTech/image-optimize-command) is a [Typist Tech](https://typist.tech) project and maintained by [Tang Rufus](https://twitter.com/TangRufus), freelance developer for [hire](https://www.typist.tech/contact/).
369-
370-
Full list of contributors can be found [here](https://github.com/TypistTech/image-optimize-command/graphs/contributors).
339+
[Image Optimize Command](https://github.com/TypistTech/image-optimize-command) is a [Typist Tech](https://www.typist.tech) project and maintained by [Tang Rufus](https://twitter.com/Tangrufus), freelance developer for [hire](https://www.typist.tech/contact/).
371340

372341
Special thanks to [Freek Van der Herten](https://github.com/freekmurze/) whose [`spatie/image-optimizer`](https://github.com/spatie/image-optimizer) package makes this project possible.
373342

343+
Full list of contributors can be found [here](https://github.com/TypistTech/image-optimize-command/graphs/contributors).
344+
374345
## License
375346

376-
The MIT License (MIT). Please see [License File](./LICENSE.md) for more information.
347+
[Image Optimize Command](https://github.com/TypistTech/image-optimize-command) is released under the [MIT License](https://opensource.org/licenses/MIT).

composer.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@
6969
"pretag": [
7070
"composer update --no-suggest",
7171
"@test",
72-
"@style:check",
73-
"npx doctoc README.md",
74-
"github_changelog_generator --no-verbose"
72+
"@style:check"
7573
],
7674
"style:check": "phpcs",
7775
"style:fix": "phpcbf",

0 commit comments

Comments
 (0)