Skip to content

The swiss army knife of lossless video/audio editing

Move README and website images to static.mifi.no

Mikael Finstad261022a1c639
diff --git a/README.md b/README.md
index 004a747e..20d62fea 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
<a href="https://mifi.no/thanks/">Thanks to my supporters</a> and everyone who purchased LosslessCut!
<br>
<br>
- <p align="center"><img src="main_screenshot.jpg" width="600" alt="screenshot" /></p>
+ <p align="center"><img src="https://static.mifi.no/dist/losslesscut/screenshots/main-2000.jpg" width="600" alt="screenshot" /></p>
<br>
<br>
</div>
diff --git a/main_screenshot.jpg b/main_screenshot.jpg
deleted file mode 100644
index 28d4f104..00000000
Binary files a/main_screenshot.jpg and /dev/null differ
diff --git a/no.mifi.losslesscut.appdata.xml b/no.mifi.losslesscut.appdata.xml
index d068f745..ee1c8f82 100644
--- a/no.mifi.losslesscut.appdata.xml
+++ b/no.mifi.losslesscut.appdata.xml
@@ -14,7 +14,7 @@
<launchable type="desktop-id">no.mifi.losslesscut.desktop</launchable>
<screenshots>
<screenshot type="default">
- <image>https://raw.githubusercontent.com/mifi/lossless-cut/master/main_screenshot.jpg</image>
+ <image>https://static.mifi.no/dist/losslesscut/screenshots/main-2000.jpg</image>
<caption>A screenshot of the main window of LosslessCut</caption>
</screenshot>
</screenshots>
diff --git a/tracks_screenshot.jpg b/tracks_screenshot.jpg
deleted file mode 100644
index 387408f7..00000000
Binary files a/tracks_screenshot.jpg and /dev/null differ
diff --git a/website/README.md b/website/README.md
index 9c50890d..92a05bc8 100644
--- a/website/README.md
+++ b/website/README.md
@@ -27,7 +27,7 @@ App versions from before that link to `https://mifi.no/losslesscut/<name>` (same
## Homepage
-`src/pages/index.astro` (the `<head>`) and `src/components/Home.tsx` (the content), styled by `src/styles/home.css`, with its images in `src/assets/home/` (plus the store badges and the app icon from the repo). The content is a React component, rendered to static HTML at build time (no client-side JavaScript), so it can move to another React framework if needed. It doesn't use Starlight's components, since those bring Starlight's global CSS along (see `src/components/socialIcons.ts`).
+`src/pages/index.astro` (the `<head>`) and `src/components/Home.tsx` (the content), styled by `src/styles/home.css`, with its images on static.mifi.no (URLs in `src/images.ts`), plus the store badges and the app icon from the repo. The content is a React component, rendered to static HTML at build time (no client-side JavaScript), so it can move to another React framework if needed. It doesn't use Starlight's components, since those bring Starlight's global CSS along (see `src/components/socialIcons.ts`).
Official links (GitHub, stores, social media) are in `src/links.ts`.
diff --git a/website/public/og-image.jpg b/website/public/og-image.jpg
deleted file mode 100644
index 09241110..00000000
Binary files a/website/public/og-image.jpg and /dev/null differ
diff --git a/website/src/assets/home/background.jpg b/website/src/assets/home/background.jpg
deleted file mode 100644
index b7317033..00000000
Binary files a/website/src/assets/home/background.jpg and /dev/null differ
diff --git a/website/src/assets/home/background2.jpg b/website/src/assets/home/background2.jpg
deleted file mode 100644
index 99aee908..00000000
Binary files a/website/src/assets/home/background2.jpg and /dev/null differ
diff --git a/website/src/assets/home/main-screenshot.jpg b/website/src/assets/home/main-screenshot.jpg
deleted file mode 100644
index c29c0743..00000000
Binary files a/website/src/assets/home/main-screenshot.jpg and /dev/null differ
diff --git a/website/src/assets/home/original.jpg b/website/src/assets/home/original.jpg
deleted file mode 100644
index 981e63c8..00000000
Binary files a/website/src/assets/home/original.jpg and /dev/null differ
diff --git a/website/src/assets/home/reencoded.jpg b/website/src/assets/home/reencoded.jpg
deleted file mode 100644
index e533f49d..00000000
Binary files a/website/src/assets/home/reencoded.jpg and /dev/null differ
diff --git a/website/src/assets/home/tracks-screenshot.jpg b/website/src/assets/home/tracks-screenshot.jpg
deleted file mode 100644
index 1704c000..00000000
Binary files a/website/src/assets/home/tracks-screenshot.jpg and /dev/null differ
diff --git a/website/src/components/Home.tsx b/website/src/components/Home.tsx
index 9c60b739..bf43ef68 100644
--- a/website/src/components/Home.tsx
+++ b/website/src/components/Home.tsx
@@ -5,13 +5,8 @@ import macAppStoreBadge from '../../../mac-app-store-badge.svg?url';
import msStoreBadge from '../../../ms-store-badge.svg?url';
import snapStoreBadge from '../../../snap-store-black.svg?url';
import logo from '../../../src/renderer/src/icon.svg?url';
-import background1 from '../assets/home/background.jpg?url';
-import background2 from '../assets/home/background2.jpg?url';
-import mainScreenshot from '../assets/home/main-screenshot.jpg?url';
-import original from '../assets/home/original.jpg?url';
-import reencoded from '../assets/home/reencoded.jpg?url';
-import tracksScreenshot from '../assets/home/tracks-screenshot.jpg?url';
+import { background1, background2, generationLossOriginal, generationLossReencoded, mainScreenshot, tracksScreenshot } from '../images.ts';
import { authorUrl, donateUrl, githubUrl, socialLinks, storeUrls, supportEmail } from '../links.ts';
import socialIconPaths from './socialIcons.ts';
@@ -73,11 +68,11 @@ const footerLinks = [
];
// A screenshot over a full-width background image.
-function ScreenshotSection({ background, screenshot, alt, width, borderRadius, subtitle }: { background: string, screenshot: string, alt: string, width: number, borderRadius: number, subtitle: string }) {
+function ScreenshotSection({ background, screenshot, alt, width, borderRadius, subtitle }: { background: string, screenshot: { src: string, srcSet: string }, alt: string, width: number, borderRadius: number, subtitle: string }) {
return (
<div className="background" style={{ backgroundImage: `url(${background})` }}>
<div className="padded">
- <img loading="lazy" src={screenshot} alt={alt} className="screenshot" style={{ width, borderRadius }} />
+ <img loading="lazy" src={screenshot.src} srcSet={screenshot.srcSet} alt={alt} className="screenshot" style={{ width, borderRadius }} />
</div>
<div className="image-subtitle">{subtitle}</div>
</div>
@@ -135,7 +130,7 @@ export default function Home() {
<WhiteSection>
<div className="comparison" style={{ maxWidth: '700px' }}>
<h2 style={{ margin: '20px 0' }}>Traditional video editors</h2>
- <img loading="lazy" src={reencoded} alt="Generational compression artifacts from re-encoding" className="comparison-image" />
+ <img loading="lazy" src={generationLossReencoded} alt="Generational compression artifacts from re-encoding" className="comparison-image" />
<p>
Any operation in a <b className="key-point">normal video editor</b><br />
@@ -147,7 +142,7 @@ export default function Home() {
<div className="comparison" style={{ maxWidth: '800px' }}>
<h2 style={{ marginTop: '40px', marginBottom: '20px' }}><a style={{ color: 'inherit', textDecoration: 'none' }} href="/">LosslessCut<span style={{ opacity: '0.6' }}>.app</span></a></h2>
- <img loading="lazy" alt="The original, without generational compression artifacts" src={original} className="comparison-image" />
+ <img loading="lazy" alt="The original, without generational compression artifacts" src={generationLossOriginal} className="comparison-image" />
<p>
LosslessCut will do the same <b className="key-point">in seconds</b> without losing quality
</p>
diff --git a/website/src/images.ts b/website/src/images.ts
new file mode 100644
index 00000000..e8937dbe
--- /dev/null
+++ b/website/src/images.ts
@@ -0,0 +1,23 @@
+// The homepage's images are hosted on static.mifi.no (originals in src/, resized versions in dist/).
+// The `''` size is about 0.3 megapixels and `-2000` is the full image for these, so they make a 1x/2x pair.
+const baseUrl = 'https://static.mifi.no';
+
+export const mainScreenshot = {
+ src: `${baseUrl}/dist/losslesscut/screenshots/main.jpg`,
+ srcSet: `${baseUrl}/dist/losslesscut/screenshots/main.jpg 1x, ${baseUrl}/dist/losslesscut/screenshots/main-2000.jpg 2x`,
+};
+
+export const tracksScreenshot = {
+ src: `${baseUrl}/dist/losslesscut/screenshots/tracks.jpg`,
+ srcSet: `${baseUrl}/dist/losslesscut/screenshots/tracks.jpg 1x, ${baseUrl}/dist/losslesscut/screenshots/tracks-2000.jpg 2x`,
+};
+
+export const background1 = `${baseUrl}/dist/losslesscut/website/background-1000.jpg`;
+export const background2 = `${baseUrl}/dist/losslesscut/website/background2-1000.jpg`;
+
+// The originals, since re-encoding would add artifacts to the comparison
+export const generationLossOriginal = `${baseUrl}/src/losslesscut/website/generation-loss-original.jpg`;
+export const generationLossReencoded = `${baseUrl}/src/losslesscut/website/generation-loss-reencoded.jpg`;
+
+// Social preview image (1200x630)
+export const ogImage = `${baseUrl}/dist/losslesscut/og-image-1000.jpg`;
diff --git a/website/src/pages/index.astro b/website/src/pages/index.astro
index 9c0c1c3a..b39ddb70 100644
--- a/website/src/pages/index.astro
+++ b/website/src/pages/index.astro
@@ -1,5 +1,6 @@
---
import Home from '../components/Home.tsx';
+import { ogImage } from '../images.ts';
import { mastodonUrl } from '../links.ts';
import structuredData from '../structuredData.ts';
import '../styles/home.css';
@@ -24,7 +25,7 @@ const description = 'LosslessCut - Official downloads - free or paid version. Ed
<meta property="og:description" content={description}>
<meta property="og:url" content={new URL('/', Astro.site)}>
<meta name="twitter:card" content="summary_large_image">
- <meta property="og:image" content={new URL('/og-image.jpg', Astro.site)}>
+ <meta property="og:image" content={ogImage}>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<script type="application/ld+json" is:inline set:html={JSON.stringify(structuredData)} />
diff --git a/website/src/structuredData.ts b/website/src/structuredData.ts
index 8b020bae..428c8eba 100644
--- a/website/src/structuredData.ts
+++ b/website/src/structuredData.ts
@@ -1,4 +1,5 @@
// schema.org data for the homepage (https://schema.org/SoftwareApplication).
+import { ogImage } from './images.ts';
import { authorUrl, githubUrl, socialLinks, storeUrls } from './links.ts';
export default {
@@ -16,7 +17,7 @@ export default {
description: 'The Swiss Army Knife of lossless video/audio editing. Cut, trim, merge and remux video and audio files without re-encoding.',
applicationCategory: 'MultimediaApplication',
operatingSystem: 'Windows, macOS, Linux',
- image: 'https://losslesscut.app/og-image.jpg',
+ image: ogImage,
license: 'https://www.gnu.org/licenses/old-licenses/gpl-2.0.html',
author: {
'@type': 'Person',