Fixed bug that caused featured image to be replaced
Logic for getting image h/w from query params moved to separate function