checkResolution(file) { //check resolution function if ( file.type === 'image/svg+xml') { const img = new Image(); img.src = window.URL.createObjectURL(file); img.onload = () => { let width = img.naturalWidth, height = img.naturalHeight; if ((width >= 640 && height >= 480) && (width <= 2700 && height <= 1500)) { } } } }