This function will allow you to validate any image url that ends with either jpeg, jpg, gif or png.
function checkURL(url) {
return(url.match(/\.(jpeg|jpg|gif|png)$/) != null);
}
JavaScript Developer
This function will allow you to validate any image url that ends with either jpeg, jpg, gif or png.
function checkURL(url) {
return(url.match(/\.(jpeg|jpg|gif|png)$/) != null);
}