Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Display image in it native or croped aspect ratio
Browse files Browse the repository at this point in the history
Change the fit from crop to fill and add fill=solid.  This makes it display the image based on height or width filling space first and fills the remainder with transparancy.  Is logo causes it to fill with white instead of transparent.
  • Loading branch information
B77Mills committed Jun 17, 2021
1 parent 3e16b6c commit eea2858
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/marko-web-photoswipe/components/images.marko
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ $ const items = images.map((image) => {
const defaultOptions = {
w: maxSize,
h: round(maxSize / (16 / 9)), // default 16:9 height
fit: "crop",
fit: "fill",
fill: "solid",
};
const imageOptions = {
Expand Down

0 comments on commit eea2858

Please sign in to comment.