# Thumbnails sized for the tile's WIDTH at 2x density, not 512 on the longest # side. The operator on sindra-nude-final, 2026-09-23: "the images look blurry # until they're selected and blown up". Every row is a change # tests/test_thumbs.py or tests/test_thumbs_browser.py claims to forbid. unit = "thumbnails sized for the tile" [[mutation]] label = "the old rule: bound the longest side at 512 (portraits get 256px of width)" file = "booth/thumbs.py" test = "tests/test_thumbs.py::test_a_portrait_keeps_its_full_width" old = ''' im.thumbnail((THUMB_WIDTH, THUMB_HEIGHT_MAX))''' new = ''' im.thumbnail((512, 512))''' [[mutation]] label = "the width bound is below what the desktop tile needs at 2x" file = "booth/thumbs.py" test = "tests/test_thumbs_browser.py::test_a_thumbnail_covers_its_tile_at_2x_density" old = ''' THUMB_WIDTH = 768''' new = ''' THUMB_WIDTH = 640''' [[mutation]] label = "no height bound: a long screenshot goes through at full height" file = "booth/thumbs.py" test = "tests/test_thumbs.py::test_an_extremely_tall_image_is_bounded_by_height_too" old = ''' im.thumbnail((THUMB_WIDTH, THUMB_HEIGHT_MAX))''' new = ''' im.thumbnail((THUMB_WIDTH, 10 ** 6))''' [[mutation]] label = "fitting in pixels is taken as light in bytes (the megabyte portrait is served whole)" file = "booth/thumbs.py" test = "tests/test_thumbs.py::test_a_tile_width_image_that_is_heavy_still_gets_a_thumbnail" old = ''' if fits and (s_stat.st_size <= THUMB_LIGHT_BYTES or getattr(im, "is_animated", False)):''' new = ''' if fits:''' [[mutation]] label = "an already small, light image gets a cache entry that saves nothing" file = "booth/thumbs.py" test = "tests/test_thumbs.py::test_an_already_small_image_gets_no_thumbnail" old = ''' if fits and (s_stat.st_size <= THUMB_LIGHT_BYTES or getattr(im, "is_animated", False)):''' new = ''' if fits and getattr(im, "is_animated", False):''' [[mutation]] label = "a heavy animated GIF that fits is flattened to one frame" file = "booth/thumbs.py" test = "tests/test_thumbs.py::test_an_animated_gif_that_fits_is_served_as_itself" old = ''' if fits and (s_stat.st_size <= THUMB_LIGHT_BYTES or getattr(im, "is_animated", False)):''' new = ''' if fits and s_stat.st_size <= THUMB_LIGHT_BYTES:''' [[mutation]] label = "an unversioned cache name: a thumbnail cut to the old rule is served forever" file = "booth/thumbs.py" test = "tests/test_thumbs.py::test_a_thumbnail_cut_to_the_old_rule_is_not_served" old = ''' return booth / THUMB_DIR / f"{rel}.{THUMB_WIDTH}w.webp"''' new = ''' return booth / THUMB_DIR / (rel + ".webp")'''