fix ImageComponent embeds due to extensions being mixedcase
This commit is contained in:
@@ -160,7 +160,10 @@ std::string GetExtension(std::string url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool IsURLViewableImage(const 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",
|
static const char *exts[] = { ".jpeg",
|
||||||
".jpg",
|
".jpg",
|
||||||
".png", nullptr };
|
".png", nullptr };
|
||||||
|
Reference in New Issue
Block a user