Closed zoglo closed 1 year ago
I want to wait with this PR as there is more to improve on this end
This PR introduces local bootstrap support so styles don't get loaded via CDN anymore https://github.com/therungg/therun-frontend/pull/93/commits/eaa9dda9e142823290232a00c434636ba97c6fc6
Images from IGDB were loaded in a much higher resolution than needed which would lead to more kB being downloaded on page load.
Hence Introducing a new component GameImage that allows following properties that was always replaced for all images:
src: string;
alt: string;
width?: SafeNumber;
height?: SafeNumber;
quality?: Quality;
loading?: LoadingValue;
placeholder?: PlaceholderValue;
style?: React.CSSProperties;
Usage:
import { GameImage } from "~src/components/image/gameimage";
You can use following qualities for images from igdb:
"small" | "medium" | "large" | "sd" | "hd";
The URL from the API that delivers the "cover_big" image will be transformed into the new properties according to the image sizes listed here: https://api-docs.igdb.com/#images
This PR introduces page speed optimizations for external src images from igdb and adds a proper alt tag for A11Y
More Optimizations will be added to that PR