-
-
Notifications
You must be signed in to change notification settings - Fork 513
Sideloaded image tmp files are not cleaned up #2216
Copy link
Copy link
Closed
Labels
good first issuehelp wantedDo you know computer? Then lend a hand and have your code live in infamy!Do you know computer? Then lend a hand and have your code live in infamy!
Description
Expected behavior
After having sideloaded an external image, the temporary file created by download_url should be deleted.
Timber downloads the image using download_url here https://github.com/timber/timber/blob/1.15.1/lib/ImageHelper.php#L376. If you read the docs of the function, it says:
Please note that the calling function must unlink() the file.
This is never done and should be added below this line https://github.com/timber/timber/blob/1.15.1/lib/ImageHelper.php#L388.
Actual behavior
Temporary files are never deleted.
Steps to reproduce behavior
Sorry, i dont have a real example at the moment but I can come back to this issue and update this later.
What version of WordPress, PHP and Timber are you using?
PHP 7.2
Timber: master
How did you install Timber? (for example, from GitHub, Composer/Packagist, WP.org?)
Github
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issuehelp wantedDo you know computer? Then lend a hand and have your code live in infamy!Do you know computer? Then lend a hand and have your code live in infamy!