Skip to content

Commit

Permalink
optimize images komorebi params
Browse files Browse the repository at this point in the history
  • Loading branch information
eogito committed Apr 7, 2024
1 parent 076479c commit 5324852
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/components/auth/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const Login = (): JSX.Element => {
<div className="container">
<div className="row wrapper">
<div className="col m12 l6 hide-on-med-and-down">
<img className="responsive-img account-art" src="/resources/static/img/log-in.png" />
<img className="responsive-img account-art" src="/resources/static/img/log-in.png?w=800&fmt=webp" />
</div>
<div className="col m12 l6">
<div className="form-wrapper">
Expand Down
2 changes: 1 addition & 1 deletion src/components/auth/register/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const Register = (): JSX.Element => {

<div className="container">
<div className="row wrapper">
<div className="graphic col m12 l6 hide-on-med-and-down account-art" style={{ backgroundImage: "url('/resources/static/img/sign-up.png')" }}>
<div className="graphic col m12 l6 hide-on-med-and-down account-art" style={{ backgroundImage: "url('/resources/static/img/sign-up.png?w=800&fmt=webp')" }}>
</div>
<div className="col m12 l6">
<div className="form-wrapper">
Expand Down
2 changes: 1 addition & 1 deletion src/components/blog/details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const BlogDetails = (): JSX.Element => {
<link rel="stylesheet" href="/resources/static/css/blog-detail.css" />
<div className="container">
<div className="card-container">
<img className="card-image" src={post.featured_image} />
<img className="card-image" src={post.featured_image+"?w=800&fmt=webp"} />
<div className="tag-section">
{
tags.map((tag: Tag) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/blog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const BlogPostElement = (props: { post: BlogPost, tags: Array<Tag> }): JSX.Eleme
<>
<div className="card">
<div className="card-headers">
<img className="card-image" src={post.featured_image} />
<img className="card-image" src={post.featured_image+"?w=800&fmt=webp"} />
<div className="card-text">
<div className="tag-section">
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/clubs/details/edit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const EditClubDetails = (): JSX.Element => {
<link rel="stylesheet" href="/resources/static/css/edit-club.css"></link>
<div className="edit-club">
<div className="row">
<img className="club-banner responsive-img col s12" src={club.banner} alt="banner of organization" />
<img className="club-banner responsive-img col s12" src={club.banner+"?w=2000&fmt=webp"} alt="banner of organization" />
</div>
<div className="container">
<div className="white-bg box-center">
Expand Down
4 changes: 2 additions & 2 deletions src/components/clubs/details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ export const ClubDetails = (): JSX.Element => {

<div className="club">
<div className="row">
<img className="club-banner responsive-img col s12" src={club.banner} alt="banner of organization" />
<img className="club-banner responsive-img col s12" src={club.banner+"?w=2000&fmt=webp"} alt="banner of organization" />
</div>
<div className="container">
<div className="club-detail">
<div className="row club-header">
<div className="col m3 s12">
<div className="club-logo">
<img className="circle" src={club.icon} alt="icon of organization" />
<img className="circle" src={club.icon+"?w=800&fmt=webp"} alt="icon of organization" />
</div>
</div>
<div className="col m5 s12">
Expand Down
2 changes: 1 addition & 1 deletion src/components/clubs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const Club = (props: { club: Organization, tags: Tag[] }): JSX.Element => {
<div className={`card ${get_membership_status()}-status`}>
<div className="valign-wrapper">
<div className="club-logo">
<img className="circle" src={club.icon} />
<img className="circle" src={club.icon+"?w=800&fmt=webp"} />
</div>
<h1 className="title link">
<Link to={`/club/${club.slug}`}>{club.name}</Link>
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const FeaturedBlogPost = (props: { post: BlogPost }): JSX.Element => {
const post = props.post;
return (
<div className="blog">
<img className="blog-image" src={post.featured_image} />
<img className="blog-image" src={post.featured_image+"?w=800&fmt=webp"} />
<div className="blog-content">
<p className="title">{post.title}</p>
<hr />
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/schedule/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const Schedule = (): JSX.Element => {

return (
<div className="banner">
<div className="background"><img alt="" src={theme.bannerImage} /></div>
<div className="background"><img alt="" src={theme.bannerImage+"?w=2000&fmt=webp"} /></div>
<div className="overlay-container valign-wrapper" >
<div className="next-class">
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/markdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Markdown = ({ text }: { text: string }): JSX.Element => { //takes markdown
return safeEmbed(el.src!) ? (
<iframe className="markdown-embed" allowFullScreen frameBorder={0} src={el.src} />
) : (
<img src={el.src} alt={el.alt} />
<img src={el.src+"?w=800&fmt=webp"} alt={el.alt} />
)
}
}} />
Expand Down
4 changes: 2 additions & 2 deletions src/components/notfound/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export const NotFound = (): JSX.Element => {
<link rel="stylesheet" href="/resources/static/css/404.css" />
<div className="main-container card">
<h2 className="center-align message">404: Page Not Found</h2>
<img className="comic-img" style={{ maxWidth: "100%" }} src={`/resources/static/img/404-comics/404-${comic}.png`} />
<img className="comic-img" style={{ maxWidth: "100%" }} src={`/resources/static/img/404-comics/404-${comic}.png?w=2000&fmt=webp`} />

<div className="display-metropolis valign-wrapper">
<img className="inline-logo" src={theme.logo} />
<img className="inline-logo" src={theme.logo+"?w=&fmt=webp"} />
</div>

<div className="game-container" hidden={true}>
Expand Down

5 comments on commit 5324852

@JasonLovesDoggo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a misformed param!

@eogito
Copy link
Contributor Author

@eogito eogito commented on 5324852 Apr 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean. Like should I just follow the /<path>?w=&h=&fmt= template.

@JasonLovesDoggo
Copy link
Member

@JasonLovesDoggo JasonLovesDoggo commented on 5324852 Apr 7, 2024 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eogito
Copy link
Contributor Author

@eogito eogito commented on 5324852 Apr 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. I didn't see an H parameter on Ken's example so I just didn't add one. I'll fix it.

@JasonLovesDoggo
Copy link
Member

@JasonLovesDoggo JasonLovesDoggo commented on 5324852 Apr 7, 2024 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.