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

refactor(image): simplify image uploading #4189

Draft
wants to merge 3 commits into
base: staging
Choose a base branch
from

Conversation

elbotho
Copy link
Member

@elbotho elbotho commented Oct 14, 2024

replace custom image configs with one that supports S3, new api route for signed urls

(checkout bucket at https://play.min.io:9443/browser/serlo-test-bucket with minioadmin // minioadmin as credentials)

todo:

change api url to get presigned request depending on env or editor prop

Copy link

vercel bot commented Oct 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
frontend ✅ Ready (Inspect) Visit Preview Oct 18, 2024 10:53am

Copy link
Contributor

github-actions bot commented Oct 14, 2024

📦 Next.js Bundle Analysis for @serlo/frontend

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 104.59 KB (🟡 +3 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Sixty-nine Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 86.13 KB (-4 B) 190.72 KB
/404 42.79 KB (-4 B) 147.38 KB
/500 42.78 KB (-4 B) 147.38 KB
/[...slug] 86.79 KB (-4 B) 191.38 KB
/___bot_or_not 101.22 KB (-4 B) 205.81 KB
/___cf_not_found 41.02 KB (-4 B) 145.61 KB
/___design 146.33 KB (-4 B) 250.92 KB
/___editor_preview 533.15 KB (🟢 -26.02 KB) 637.74 KB
/___old_comments 103.62 KB (-4 B) 208.21 KB
/auth/___activate_vidis 41.32 KB (-4 B) 145.91 KB
/auth/error 66.63 KB (-4 B) 171.22 KB
/auth/login 94.33 KB (-4 B) 198.92 KB
/auth/logout 85.06 KB (-4 B) 189.65 KB
/auth/oauth/consent 58.89 KB (-4 B) 163.48 KB
/auth/oauth/login 94.33 KB (-4 B) 198.92 KB
/auth/oauth/logout 85.06 KB (-4 B) 189.66 KB
/auth/recovery 75.99 KB (-4 B) 180.58 KB
/auth/registration 76.75 KB (-4 B) 181.34 KB
/auth/settings 76.86 KB (-4 B) 181.45 KB
/auth/verification 76.14 KB (-4 B) 180.74 KB
/authorization/roles 70.74 KB (-4 B) 175.33 KB
/backend 43.08 KB (-4 B) 147.67 KB
/biologie 155.33 KB (-4 B) 259.92 KB
/chemie 155.33 KB (-4 B) 259.92 KB
/consent 41.61 KB (-4 B) 146.21 KB
/content-only/[...slug] 78.83 KB (-4 B) 183.42 KB
/discussions 100.55 KB (-4 B) 205.14 KB
/editor 79.59 KB (🟢 -14 B) 184.18 KB
/entity/create/[type]/[taxonomyId] 560.76 KB (🟢 -574 B) 665.35 KB
/entity/license/update/[id] 60.91 KB (-4 B) 165.5 KB
/entity/repository/add-revision/[...id] 560.44 KB (🟢 -574 B) 665.03 KB
/entity/repository/compare/[entity_id]/[revision_id] 91.53 KB (-4 B) 196.12 KB
/entity/repository/history/[id] 74.25 KB (-4 B) 178.84 KB
/entity/taxonomy/update/[id] 73.39 KB (-4 B) 177.98 KB
/entity/unrevised 48.28 KB (-4 B) 152.87 KB
/event/history 127.08 KB (-4 B) 231.67 KB
/event/history/[...slug] 128.08 KB (-4 B) 232.67 KB
/event/history/user/profile/[username] 130.94 KB (-4 B) 235.54 KB
/gleichungs-app 165.1 KB (-4 B) 269.69 KB
/informatik 155.33 KB (-4 B) 259.92 KB
/jobs/[[...jobId]] 52.29 KB (-4 B) 156.88 KB
/legal 41.09 KB (-4 B) 145.68 KB
/lerntipps 155.33 KB (-4 B) 259.92 KB
/license/detail/[id] 66.75 KB (-4 B) 171.34 KB
/mathe 155.33 KB (-4 B) 259.92 KB
/mathe-aufgaben 41.81 KB (-4 B) 146.4 KB
/mathe-pruefungen/[region] 78.16 KB (-4 B) 182.75 KB
/metadata 50.89 KB (-4 B) 155.48 KB
/nachhaltigkeit 155.33 KB (-4 B) 259.93 KB
/page/create 560.46 KB (🟢 -572 B) 665.05 KB
/pages 62.22 KB (-4 B) 166.81 KB
/privacy 44.73 KB (-4 B) 149.32 KB
/search 43.08 KB (-4 B) 147.67 KB
/spenden 55.47 KB (-4 B) 160.07 KB
/subscriptions/manage 110.09 KB (-4 B) 214.68 KB
/taxonomy/term/[copyOrMove]/batch/[id] 76.01 KB (-4 B) 180.6 KB
/taxonomy/term/create/[parent_id]/[id] 560.18 KB (🟢 -578 B) 664.78 KB
/taxonomy/term/sort/entities/[id] 97.73 KB (-4 B) 202.32 KB
/taxonomy/term/update/[id] 560.1 KB (🟢 -577 B) 664.7 KB
/team 48.99 KB (-4 B) 153.58 KB
/terms 41.11 KB (-4 B) 145.7 KB
/user/[...userslug] 40.92 KB (-4 B) 145.51 KB
/user/me 40.9 KB (-4 B) 145.49 KB
/user/notifications 129.39 KB (-4 B) 233.98 KB
/user/profile/[username] 178.32 KB (-4 B) 282.91 KB
/user/settings 533.86 KB (🟢 -26.02 KB) 638.45 KB
/uuid/recycle-bin 84.46 KB (-4 B) 189.05 KB
/wallet 43.79 KB (-4 B) 148.39 KB
/willkommen 88.03 KB (-4 B) 192.62 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant