mirror of
https://github.com/discourse/discourse.git
synced 2026-08-04 10:39:43 +08:00
Previously, important image-processing behavior lacked precise regression coverage, making image-library upgrades difficult to assess safely. This change adds coverage without changing production behavior: - Exercises public upload and image-model outcomes for SVG sanitization, format detection and conversion, transparency, animation metadata, EXIF orientation normalization, malformed input rejection, crop positioning, tiny-image resizing, dominant-color caching, and image-quality selection. - Keeps normal LetterAvatar RSpec coverage portable by generating one representative PNG and checking its format and requested dimensions. - Adds a separate Linux-only `script/letter_avatar_pixel_diff` workflow that compares A–Z renders with committed baselines and generates an HTML expected/actual/highlighted-diff report. Use `--update-baselines` when intentionally accepting rendering changes. - Uses deterministic fixtures with regeneration guidance beside the relevant specs. |
||
|---|---|---|
| .. | ||
| letter_avatar_visual/linux | ||
| upcoming_changes | ||
| vanilla_import | ||
| 2000x2000.png | ||
| animated.gif | ||
| animated.webp | ||
| bad-xml-icon-sprite.svg | ||
| broken.png | ||
| crop_position.png | ||
| cropped.png | ||
| custom-theme-component-icon-sprite.svg | ||
| custom-theme-icon-sprite.svg | ||
| downsized.png | ||
| exif_orientation.jpg | ||
| fake.jpg | ||
| fake.long-FileExtension | ||
| fake.not_image | ||
| hostile_entity.svg | ||
| huge.jpg | ||
| image.svg | ||
| image_no_extension | ||
| large_and_unoptimized.png | ||
| large_icon_correct.png | ||
| large_icon_incorrect.png | ||
| logo-dev.png | ||
| logo.jpg | ||
| logo.png | ||
| massive.svg | ||
| not_an_image | ||
| png_as.bin | ||
| pngquant.png | ||
| resized.png | ||
| should_be_jpeg.heic | ||
| should_be_jpeg.png | ||
| smallest.ico | ||
| smallest.png | ||
| svg.png | ||
| tiff_as.bin | ||
| tiny.svg | ||
| tiny_animated.gif | ||
| transparent.png | ||
| webp_as.bin | ||
| zero_sized.svg | ||