Skip to content

Commit

Permalink
fix ImageComponent embeds due to extensions being mixedcase
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMorc committed Aug 23, 2023
1 parent 0b918a7 commit c56a109
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ std::string GetExtension(std::string url) {
}

bool IsURLViewableImage(const std::string &url) {
const auto ext = GetExtension(url);
std::string lw_url = url;
std::transform(lw_url.begin(), lw_url.end(), lw_url.begin(), ::tolower);

const auto ext = GetExtension(lw_url);
static const char *exts[] = { ".jpeg",
".jpg",
".png", nullptr };
Expand Down

0 comments on commit c56a109

Please sign in to comment.