function isVisible(imageRect, viewportDimensions) {
  return (
    (imageRect.bottom - imageRect.top) * (imageRect.right - imageRect.left) > 0 &&
    imageRect.top <= viewportDimensions.innerHeight &&
    imageRect.bottom >= 0 &&
    imageRect.left <= viewportDimensions.innerWidth &&
    imageRect.right >= 0
  );
}
@param {{top: number, bottom: number, left: number, right: number}} imageRect
@param {{innerWidth: number, innerHeight: number}} viewportDimensions
@return {boolean}