Skip to content

Comments

Skip images without src or srcset#93

Merged
rkoopmans merged 5 commits intotinify:masterfrom
wcreateweb:fix/skip-images-without-src
Feb 16, 2026
Merged

Skip images without src or srcset#93
rkoopmans merged 5 commits intotinify:masterfrom
wcreateweb:fix/skip-images-without-src

Conversation

@tijmenbruggeman
Copy link
Collaborator

This PR will resolve an issue where path was not in array:

PHP Warning: Undefined array key "path"
File: /wp-content/plugins/tiny-compress-images/src/class-tiny-source-base.php

This happened because the process was trying to handle images without a src or srcset.

  • Added tests to confirm bug
  • Filtered images without src and srcset
  • Added check to skip empty sources

@rkoopmans rkoopmans merged commit 4478f53 into tinify:master Feb 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants