Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand conversion of web-unsafe image formats (JPEG XL) #657

Merged
merged 30 commits into from
Sep 9, 2024

Conversation

swissspidy
Copy link
Owner

@swissspidy swissspidy commented Sep 3, 2024

  • Adds a new convertUnsafe toggle
  • Adds a new useAi toggle for the image caption generation
  • Allows automatically converting unsafe images like JPEG XL, TIFF, or — like already present — HEIC.
Screenshot 2024-09-06 at 11 34 57

Apparently if the browser doesn't support the mime type when adding a file to an <input>, the mime type could be empty.

Weirdly, in my local testing this wasn't the case in Chromium, but somehow was on CI. So maybe it also has to do with the OS / environment (CI uses wp-env). Manually providing the mime type fixes this, but begs the question whether further testing is required in that regard. An empty mime type should just fall through to simple upload though.

Fixes #656

@swissspidy swissspidy added the enhancement New feature or request label Sep 3, 2024
Copy link

github-actions bot commented Sep 3, 2024

Size Change: +394 B (+0.01%)

Total Size: 7.31 MB

Filename Size Change
build/media-experiments.js 78.9 kB +260 B (+0.33%)
build/view-upload-request.js 18.9 kB +174 B (+0.93%)
ℹ️ View Unchanged
Filename Size Change
build/100.js 89.6 kB 0 B
build/699.js 2.35 MB 0 B
build/ai.worker.js 178 kB 0 B
build/blurhash.worker.js 3.23 kB 0 B
build/canvas.worker.js 2.79 kB 0 B
build/chunk-ffmpeg.js 5.92 kB 0 B
build/chunk-selfie-segmentation.js 16.3 kB 0 B
build/dominant-color.worker.js 4.45 kB 0 B
build/ffmpeg.js 1.09 kB 0 B
build/heif.worker.js 450 kB 0 B
build/media-experiments-blocks-rtl.css 297 B 0 B
build/media-experiments-blocks.css 296 B 0 B
build/media-experiments-rtl.css 1.03 kB 0 B
build/media-experiments.css 1.03 kB 0 B
build/pdf.js 579 B 0 B
build/subtitles.js 850 B 0 B
build/view-upload-request-view-rtl.css 697 B 0 B
build/view-upload-request-view.css 699 B 0 B
build/vips-heif.********.wasm 1.27 MB 0 B
build/vips-jxl.********.wasm 800 kB 0 B
build/vips.********.wasm 2 MB 0 B
build/vips.worker.js 37.9 kB -40 B (-0.11%)

compressed-size-action

@swissspidy swissspidy changed the title JPEG XL conversion Expand conversion of web-unsafe image formats (JPEG XL) Sep 6, 2024
@swissspidy swissspidy marked this pull request as ready for review September 9, 2024 22:30
@swissspidy swissspidy merged commit f9dc2b9 into main Sep 9, 2024
21 checks passed
@swissspidy swissspidy deleted the try/656-jpeg-xl branch September 9, 2024 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JPEG XL support / testing
1 participant