Skip to content

Commit

Permalink
Force png image type on avatar upload.
Browse files Browse the repository at this point in the history
  • Loading branch information
corentin-soriano committed Oct 25, 2024
1 parent a159f9d commit 487847d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/upload.files.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@
null !== ($post_type_upload)
&& $post_type_upload === 'upload_profile_photo'
) {
// get file extension
$ext = (string) pathinfo($filePath, PATHINFO_EXTENSION);
// PNG is the only supported extension
$ext = "png";

// rename the file
rename(
Expand Down

0 comments on commit 487847d

Please sign in to comment.