From 4680f5c69666368ec68e8fd7dfdc992ff7ce9768 Mon Sep 17 00:00:00 2001 From: Sertii <36940685+Sreini@users.noreply.github.com> Date: Mon, 16 Feb 2026 07:34:38 +0100 Subject: [PATCH 1/6] release: 3.6.10 --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 565e7c67..aa6e9ea1 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://tinypng.com/ Tags: compress images, compression, image size, page speed, performance Requires at least: 4.0 Tested up to: 6.9 -Stable tag: 3.6.9 +Stable tag: 3.6.10 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html From c9949537e402c511aa754b785db7eab38526ba24 Mon Sep 17 00:00:00 2001 From: tijmen Date: Wed, 29 Apr 2026 13:36:58 +0200 Subject: [PATCH 2/6] support version 7.0 --- .github/workflows/integration-tests.yml | 2 +- config/wp-version.conf | 3 ++- readme.txt | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 59c8dc0c..b328f2b6 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -17,11 +17,11 @@ jobs: include: - { wp: 46, php: 56 } - { wp: 46, php: 70 } - - { wp: 57, php: 73 } - { wp: 60, php: 74 } - { wp: 63, php: 80 } - { wp: 67, php: 82 } - { wp: 69, php: 83 } + - { wp: 70, php: 84 } steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/config/wp-version.conf b/config/wp-version.conf index df12d545..ef585951 100644 --- a/config/wp-version.conf +++ b/config/wp-version.conf @@ -5,4 +5,5 @@ 60_74=wordpress:6.0-php7.4-apache 63_80=wordpress:6.3-php8.0-apache 67_82=wordpress:6.7-php8.2-apache -69_83=wordpress:6.9-php8.3-apache \ No newline at end of file +69_83=wordpress:6.9-php8.3-apache +70_84=wordpress:beta-7.0-RC2-php8.4-apache \ No newline at end of file diff --git a/readme.txt b/readme.txt index 07d91c90..7c7c5fe5 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: TinyPNG Donate link: https://tinypng.com/ Tags: compress images, compression, image size, page speed, performance Requires at least: 4.0 -Tested up to: 6.9 +Tested up to: 7.0 Stable tag: 3.6.13 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html From 75efda71b26954672b06fa2adbd5d2b61ea4d480 Mon Sep 17 00:00:00 2001 From: tijmen Date: Wed, 29 Apr 2026 13:51:16 +0200 Subject: [PATCH 3/6] Remove duplicate replace --- bin/run-mocks | 6 ------ 1 file changed, 6 deletions(-) diff --git a/bin/run-mocks b/bin/run-mocks index 3aef15fe..d9b61a3d 100755 --- a/bin/run-mocks +++ b/bin/run-mocks @@ -5,12 +5,6 @@ port="$1" docker compose -f config/mocks.docker-compose.yml up -d --wait -mv src/vendor/tinify/Tinify/Client.php src/vendor/tinify/Tinify/Client.php.bak -cp test/fixtures/Client.php src/vendor/tinify/Tinify/Client.php - -mv src/config/class-tiny-config.php src/config/class-tiny-config.php.bak -cp test/fixtures/class-tiny-config.php src/config/class-tiny-config.php - echo "Replacing configuration files..." mv src/vendor/tinify/Tinify/Client.php src/vendor/tinify/Tinify/Client.php.bak cp test/fixtures/Client.php src/vendor/tinify/Tinify/Client.php From 13e36d2a1fed70a60c259ea368dc05bd8e3ad2a5 Mon Sep 17 00:00:00 2001 From: tijmen Date: Wed, 29 Apr 2026 16:12:13 +0200 Subject: [PATCH 4/6] update e2e test for changes in UI WordPress 7.0 - upload media will now return attachment ID for easier navigation to the image details - Navigating to image details first went through a label but this was renamed. Going directly to the url is more reliable. - the default upload method is now async-upload.php instead of upload.php --- test/integration/compression.spec.ts | 43 ++++++++++++---------------- test/integration/conversion.spec.ts | 10 +++---- test/integration/utils.ts | 23 +++++++++++++-- 3 files changed, 44 insertions(+), 32 deletions(-) diff --git a/test/integration/compression.spec.ts b/test/integration/compression.spec.ts index 711ef288..98152b84 100644 --- a/test/integration/compression.spec.ts +++ b/test/integration/compression.spec.ts @@ -8,8 +8,8 @@ test.describe.configure({ mode: 'serial' }); let page: Page; let WPVersion = 0; -function viewImage(page: Page, file: string) { - page.getByLabel(`“${file}” (Edit)`).click(); +function viewImage(page: Page, attachmentID: string) { + return page.goto(`/wp-admin/post.php?post=${attachmentID}&action=edit`); } test.describe('compression', () => { @@ -112,9 +112,9 @@ test.describe('compression', () => { await setCompressionTiming(page, 'auto'); await enableCompressionSizes(page, ['medium', 'large']); - await uploadMedia(page, 'input-example.jpg'); + const { attachmentID } = await uploadMedia(page, 'input-example.jpg'); - await viewImage(page, 'input-example'); + await viewImage(page, attachmentID); // thickbox is used to show modal window so wait until it is loaded await page.waitForLoadState('networkidle'); @@ -145,7 +145,7 @@ test.describe('compression', () => { await setCompressionTiming(page, 'manual'); await enableCompressionSizes(page, ['medium', 'large']); await setAPIKey(page, 'JPG123'); - + await uploadMedia(page, 'input-example.jpg'); await page.goto('/wp-admin/upload.php'); @@ -176,11 +176,10 @@ test.describe('compression', () => { await setAPIKey(page, 'JPG123'); await setCompressionTiming(page, 'auto'); await enableCompressionSizes(page, ['medium']); - await uploadMedia(page, 'input-example.jpg'); + const { attachmentID } = await uploadMedia(page, 'input-example.jpg'); await enableCompressionSizes(page, ['medium', 'thumbnail']); - await page.goto('/wp-admin/upload.php'); - await viewImage(page, 'input-example'); + await viewImage(page, attachmentID); await expect(page.getByText('1 size compressed')).toBeVisible(); await expect(page.getByText('1 size to be compressed')).toBeVisible(); @@ -242,6 +241,7 @@ test.describe('compression', () => { preserveCopyright: false, preserveGPS: false, }); + await uploadMedia(page, 'input-example.jpg'); await page.goto('/wp-admin/upload.php'); @@ -266,10 +266,9 @@ test.describe('compression', () => { preserveGPS: false, }); - await uploadMedia(page, 'input-example.jpg'); + const { attachmentID } = await uploadMedia(page, 'input-example.jpg'); - await page.goto('/wp-admin/upload.php'); - await viewImage(page, 'input-example'); + await viewImage(page, attachmentID); const dimensionText = await page.locator('.misc-pub-section.misc-pub-dimensions').textContent(); const shouldMatch = /.*300\s*(x|×|by)\s*200.*/; @@ -311,10 +310,9 @@ test.describe('compression', () => { preserveGPS: false, }); - await uploadMedia(page, 'input-example.jpg'); + const { attachmentID } = await uploadMedia(page, 'input-example.jpg'); - await page.goto('/wp-admin/upload.php'); - await viewImage(page, 'input-example'); + await viewImage(page, attachmentID); const dimensionText = await page.locator('.misc-pub-section.misc-pub-dimensions').textContent(); const shouldMatch = /.*300\s*(x|×|by)\s*200.*/; @@ -358,10 +356,8 @@ test.describe('compression', () => { preserveGPS: false, }); - await uploadMedia(page, 'input-example.jpg'); - - await page.goto('/wp-admin/upload.php'); - await viewImage(page, 'input-example'); + const { attachmentID } = await uploadMedia(page, 'input-example.jpg'); + await viewImage(page, attachmentID); const dimensionText = await page.locator('.misc-pub-section.misc-pub-dimensions').textContent(); const shouldMatch = /.*1080\s*(x|×|by)\s*720.*/; @@ -396,9 +392,8 @@ test.describe('compression', () => { preserveCopyright: false, preserveGPS: false, }); - await uploadMedia(page, 'input-example.jpg'); - await page.goto('/wp-admin/upload.php'); - await viewImage(page, 'input-example'); + const { attachmentID } = await uploadMedia(page, 'input-example.jpg'); + await viewImage(page, attachmentID); const dimensionText = await page.locator('.misc-pub-section.misc-pub-dimensions').textContent(); const shouldMatch = /.*1080\s*(x|×|by)\s*720.*/; @@ -501,19 +496,19 @@ test.describe('compression', () => { await setCompressionTiming(page, 'manual'); await enableCompressionSizes(page, ['0', 'medium']); await uploadMedia(page, 'input-example.jpg'); - + await page.goto('/wp-admin/upload.php'); await page.getByRole('button', { name: 'Mark as Compressed' }).click(); await expect(page.getByText('2 sizes compressed')).toBeVisible(); await expect(page.getByText('2 sizes converted')).toBeVisible(); }); - + test('will mark multiple attachments as compressed', async () => { await setAPIKey(page, 'JPG123'); await setCompressionTiming(page, 'manual'); await enableCompressionSizes(page, ['0', 'medium']); - + await uploadMedia(page, 'input-example.jpg'); await uploadMedia(page, 'input-example.png'); diff --git a/test/integration/conversion.spec.ts b/test/integration/conversion.spec.ts index 13670f48..97f9f670 100644 --- a/test/integration/conversion.spec.ts +++ b/test/integration/conversion.spec.ts @@ -54,12 +54,12 @@ test.describe('conversion', () => { output: 'smallest', delivery: 'picture', }); - const media = await uploadMedia(page, 'input-example.jpg'); + const { imageURL } = await uploadMedia(page, 'input-example.jpg'); const postID = await newPost( page, { title: 'test', - content: `
`, + content: `
`, }, WPVersion ); @@ -76,12 +76,12 @@ test.describe('conversion', () => { output: 'smallest', delivery: 'htaccess', }); - const media = await uploadMedia(page, 'input-example.jpg'); + const { imageURL } = await uploadMedia(page, 'input-example.jpg'); const postID = await newPost( page, { title: 'test', - content: `
`, + content: `
`, }, WPVersion ); @@ -92,7 +92,7 @@ test.describe('conversion', () => { await imageResponsePromise; - const response = await page.request.get(media, { + const response = await page.request.get(imageURL, { headers: { Accept: 'image/avif,image/webp,*/*', // browser automatically add this }, diff --git a/test/integration/utils.ts b/test/integration/utils.ts index 8ee8a1b6..a94402d3 100644 --- a/test/integration/utils.ts +++ b/test/integration/utils.ts @@ -3,13 +3,23 @@ import { Page } from '@playwright/test'; export const BASE_URL = `http://localhost:${process.env.WORDPRESS_PORT}`; -export async function uploadMedia(page: Page, file: string): Promise { +interface UploadMediaResponse { + imageURL: string; + attachmentID: string; +} +export async function uploadMedia(page: Page, file: string): Promise { await page.goto('/wp-admin/media-new.php?browser-uploader'); const fileChooserPromise = page.waitForEvent('filechooser'); await page.getByLabel('Upload').click(); const fileChooser = await fileChooserPromise; await fileChooser.setFiles(path.join(__dirname, `../fixtures/${file}`)); - await Promise.all([page.waitForURL('**/wp-admin/upload.php**', { waitUntil: 'load' }), page.locator('#html-upload').click()]); + await Promise.all([ + page.waitForResponse(response => + response.url().includes('/wp-admin/async-upload.php') || + response.url().includes('/wp-admin/upload.php') + ), + page.locator('#html-upload').click(), + ]); await page.goto('/wp-admin/upload.php?mode=list'); @@ -20,9 +30,16 @@ export async function uploadMedia(page: Page, file: string): Promise { const rowID = await row.getAttribute('id'); const attachmentID = rowID?.split('-')[1]; + if (!attachmentID) { + throw Error('unable to find attachmentID'); + } await Promise.all([page.waitForURL(new RegExp(`/wp-admin/post\\.php\\?post=${attachmentID}&action=edit$`), { waitUntil: 'load' }), page.goto(`/wp-admin/post.php?post=${attachmentID}&action=edit`)]); - return page.locator('input[name="attachment_url"]').inputValue(); + const imageURL = await page.locator('input[name="attachment_url"]').inputValue(); + return { + imageURL, + attachmentID + }; } export async function clearMediaLibrary(page: Page) { From c3f846caa4cac7c6f4a596af92c3eafc5b907db9 Mon Sep 17 00:00:00 2001 From: tijmen Date: Wed, 29 Apr 2026 16:50:25 +0200 Subject: [PATCH 5/6] Change url to upload, due to async-upload.php --- test/integration/utils.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/integration/utils.ts b/test/integration/utils.ts index a94402d3..88260d7e 100644 --- a/test/integration/utils.ts +++ b/test/integration/utils.ts @@ -14,10 +14,7 @@ export async function uploadMedia(page: Page, file: string): Promise - response.url().includes('/wp-admin/async-upload.php') || - response.url().includes('/wp-admin/upload.php') - ), + page.waitForURL('**upload.php**', { waitUntil: 'load' }), page.locator('#html-upload').click(), ]); From 07ef3ca018ada0fdf601c00b45e792750ef5a2e8 Mon Sep 17 00:00:00 2001 From: tijmen Date: Wed, 29 Apr 2026 17:07:07 +0200 Subject: [PATCH 6/6] binary transfer is deprecated --- test/fixtures/Client.php | 1 - 1 file changed, 1 deletion(-) diff --git a/test/fixtures/Client.php b/test/fixtures/Client.php index 579f8196..cca4e3ef 100644 --- a/test/fixtures/Client.php +++ b/test/fixtures/Client.php @@ -19,7 +19,6 @@ private static function caBundle() { function __construct( $key, $appIdentifier = null ) { $userAgent = join( ' ', array_filter( array( self::userAgent(), $appIdentifier ) ) ); $this->options = array( - CURLOPT_BINARYTRANSFER => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => true, CURLOPT_USERPWD => $key ? ('api:' . $key) : null,