fix ImageComponent embeds due to extensions being mixedcase

This commit is contained in:
TheMorc
2023-08-23 10:49:06 +02:00
parent 0b918a748a
commit c56a109a21

View File

@@ -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 };