Serve images without PHP, add the 720 and 1280 steps, trim two hot paths
- Image widths are 480, 720, 960, 1280, 1600 and 2400. A phone needed 721 pixels and got 960. Existing images receive the new steps from a task; stored pages pick them up at render time, so no document is rewritten. Mobile backgrounds use 720. - A variant served once is mirrored to public/media, and a rewrite rule lets the web server deliver it from there. var/media stays the source. - The hero preload follows the image each device really shows. - The post navigation reads the order and then two posts instead of up to 500 documents. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
dca2665138
commit
7d0369bada
32 files changed
+550
-57
No files matched your search
@@ -954,7 +954,7 @@ final class EditorSecurityTest extends WebTestCase
|
||||
$item = json_decode($client->getResponse()->getContent(), true)['item'];
|
||||
// Four steps now; the last one is capped at the width of the source (1800 here), so a
|
||||
// picture is never blown up beyond what was uploaded.
|
||||
self::assertSame([480, 960, 1600, 1800], array_column($item['variants'], 'width'));
|
||||
self::assertSame([480, 720, 960, 1280, 1600, 1800], array_column($item['variants'], 'width'));
|
||||
foreach ($item['variants'] as $variant) {
|
||||
$file = $this->path.'-media/'.$item['id'].'-'.$variant['width'].'.webp';
|
||||
self::assertSame('image/webp', getimagesize($file)['mime']);
|
||||
|
||||
Reference in new issue
Block a user