Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:02,060 --> 00:00:04,210
So by now we optimized
2
00:00:04,210 --> 00:00:06,930
our meta tags in the head section.
3
00:00:06,930 --> 00:00:09,330
But there's another important aspect of
4
00:00:09,330 --> 00:00:11,900
basically any website you're building that
5
00:00:11,900 --> 00:00:13,890
always should be optimized,
6
00:00:13,890 --> 00:00:15,590
our images.
7
00:00:15,590 --> 00:00:18,280
We are rendering a couple of images here,
8
00:00:18,280 --> 00:00:20,660
when we rendered that list of events.
9
00:00:20,660 --> 00:00:23,550
And also when we explore a single event,
10
00:00:23,550 --> 00:00:25,530
here we also have an image.
11
00:00:25,530 --> 00:00:30,230
And in both cases, those images are not optimized at all.
12
00:00:30,230 --> 00:00:32,049
Let me show you what that means.
13
00:00:32,049 --> 00:00:34,020
On the All Events page,
14
00:00:34,020 --> 00:00:35,950
if I open the developer tools
15
00:00:35,950 --> 00:00:38,770
and we go to the Network tab here.
16
00:00:38,770 --> 00:00:41,960
If we then empty the cache and hard reload,
17
00:00:41,960 --> 00:00:44,380
by right clicking on the refresh icon,
18
00:00:44,380 --> 00:00:47,650
we make sure that we reload all the data for this page,
19
00:00:47,650 --> 00:00:49,770
including the images.
20
00:00:49,770 --> 00:00:53,440
And now let's have a look at this coding-event.jpg file.
21
00:00:53,440 --> 00:00:55,000
If I make this a bit bigger,
22
00:00:55,000 --> 00:00:58,370
we see that this image has two megabytes.
23
00:00:58,370 --> 00:01:00,970
The introvert and extrovert images are even worse,
24
00:01:00,970 --> 00:01:03,270
they have five and four megabytes.
25
00:01:03,270 --> 00:01:05,250
The reason for this is that
26
00:01:05,250 --> 00:01:08,410
these are huge unoptimized images,
27
00:01:08,410 --> 00:01:12,220
which are fetched in full size and quality.
28
00:01:12,220 --> 00:01:16,850
And we are also always using the same image type, jpeg,
29
00:01:16,850 --> 00:01:21,260
no matter if our browser maybe supports a better type.
30
00:01:21,260 --> 00:01:26,260
For example, Chrome would support the webp image type,
31
00:01:26,300 --> 00:01:29,060
which is an optimized image format.
32
00:01:29,060 --> 00:01:31,920
Now for development, that's no problem,
33
00:01:31,920 --> 00:01:34,610
but this would not be okay for production.
34
00:01:34,610 --> 00:01:37,430
These would be way too big images.
35
00:01:37,430 --> 00:01:39,750
And Next.js calls itself,
36
00:01:39,750 --> 00:01:42,870
the react framework for production.
37
00:01:42,870 --> 00:01:44,610
And shipping such big images is
38
00:01:44,610 --> 00:01:46,630
certainly not production ready.
39
00:01:46,630 --> 00:01:48,850
Therefore, for it makes a lot of sense that
40
00:01:48,850 --> 00:01:52,150
Next.js also helps us with images.
41
00:01:52,150 --> 00:01:54,810
It helps us optimize those images,
42
00:01:54,810 --> 00:01:57,973
and it does so in a super simple way.
3177
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.