UTSKRIFT 🔗
00:00:00.000 --> 00:00:01.510
Sam Brace: Welcome to DevJams.
00:00:01.530 --> 00:00:06.480
This is where we talk with developers
who are doing inspiring, innovative,
00:00:06.960 --> 00:00:11.520
interesting projects when it comes
to images and videos that happen to
00:00:11.520 --> 00:00:15.030
be the most development projects,
and they probably are likely
00:00:15.030 --> 00:00:18.540
using Cloudinary for all of that
innovative work that they are doing.
00:00:19.230 --> 00:00:20.250
My name is Sam Brace.
00:00:20.250 --> 00:00:26.080
I am the Senior Director of Customer
Education and Community for over all
00:00:26.105 --> 00:00:30.540
Cloudinary, and I'm very happy that you
are here today for this DevJams episode.
00:00:30.540 --> 00:00:35.220
This is gonna be a fabulous one if
you are interested in images, but also
00:00:35.225 --> 00:00:37.830
making them as lightweight as possible.
00:00:38.340 --> 00:00:42.160
And we're gonna be talking a lot today
about bandwidth and how to properly
00:00:42.165 --> 00:00:46.720
reduce that using functionality
available with Cloudinary, APIs,
00:00:47.390 --> 00:00:50.015
SDKs, and our overall transformations.
00:00:57.720 --> 00:01:00.520
Joining me for this
episode is Jen Brissman.
00:01:00.720 --> 00:01:04.830
She is a Technical Curriculum Engineer
here at Cloudinary on our Customer
00:01:04.830 --> 00:01:08.530
Education team, and I am very happy
to have here for this program.
00:01:08.530 --> 00:01:09.770
Jen, welcome to the show.
00:01:10.650 --> 00:01:11.020
Jen Brissman: Hey, Sam.
00:01:11.040 --> 00:01:11.670
Thanks for having me.
00:01:12.300 --> 00:01:16.110
Sam Brace: So Jen and I are, we're
gonna be talking to Grant Sander, who
00:01:16.110 --> 00:01:20.850
is the Vice President of Engineering
at Formidable, which is a firm that's
00:01:20.850 --> 00:01:26.190
focusing on design and development
for some fairly large customers.
00:01:26.250 --> 00:01:29.340
That includes probably a lot of the brands
that you're very familiar with, maybe
00:01:29.340 --> 00:01:31.200
you're purchasing from every single day.
00:01:31.380 --> 00:01:34.470
The overall development and design work
that's happening from them, a lot of those
00:01:34.470 --> 00:01:38.940
aspects are being handled by Formidable
and he's gonna be talking about their own
00:01:38.940 --> 00:01:43.950
website, formidable.com, and they're gonna
be diving into some of the ways that they
00:01:43.950 --> 00:01:47.580
were able to reduce the bandwidth and then
of course, associate that for some of the
00:01:47.580 --> 00:01:49.020
work that they're doing for their clients.
00:01:49.725 --> 00:01:51.244
But Jen, why is that exciting to you?
00:01:51.244 --> 00:01:53.785
What's getting you fired
up about this episode?
00:01:55.035 --> 00:01:56.475
Jen Brissman: I'm excited
to have Grant here.
00:01:56.475 --> 00:02:01.035
We're so lucky to have him because
he's working with Formidable, one of
00:02:01.039 --> 00:02:03.645
our partners at Cloudinary, and we
don't always get the chance to talk
00:02:03.645 --> 00:02:05.895
to people who we work with as well.
00:02:05.895 --> 00:02:07.425
And they use us, we use them.
00:02:07.425 --> 00:02:09.615
So it's cool to see how
everything works together.
00:02:09.615 --> 00:02:11.174
And we're gonna get into
that with Grant today.
00:02:12.065 --> 00:02:12.614
Sam Brace: I agree.
00:02:12.720 --> 00:02:16.440
And what's also wonderful about this
is that I think what we're gonna also
00:02:16.440 --> 00:02:20.190
talk about is a very natural evolution
that we've seen companies take when
00:02:20.190 --> 00:02:24.990
it comes to maturity of working with
images and videos and digital media
00:02:24.990 --> 00:02:29.130
essentially, where sometimes you might
start off, you're saying an S3 bucket
00:02:29.160 --> 00:02:33.030
where we're gonna store everything
in terms of a place for it to go.
00:02:33.180 --> 00:02:37.260
It's nice, cloud-based, centralized
area, that's enough for what it is.
00:02:37.290 --> 00:02:41.040
But as time goes on, you need to
start thinking about what formats
00:02:41.040 --> 00:02:42.450
are we delivering those things at?
00:02:42.510 --> 00:02:44.881
Is that really the right
level of compression that
00:02:44.886 --> 00:02:46.410
we want everything to be at?
00:02:46.680 --> 00:02:51.210
Is serving everything as originals,
actually hurting our overall performance,
00:02:51.329 --> 00:02:56.370
rather than providing some type of
variation or derivative of that file so
00:02:56.370 --> 00:02:58.280
that way it loads as quickly as possible.
00:02:58.285 --> 00:03:01.680
So what I love about what Grant's gonna
talk with us here today about is something
00:03:01.680 --> 00:03:04.980
that probably a lot of developers have
felt when they've gone through working
00:03:04.980 --> 00:03:06.390
with images and videos on the web.
00:03:07.750 --> 00:03:08.600
Jen Brissman: Absolutely.
00:03:09.600 --> 00:03:12.900
Sam Brace: So Jen, One thing that
of course, that we wanna point
00:03:12.900 --> 00:03:16.770
out to everybody is the fact
that we are in lots of places.
00:03:16.950 --> 00:03:22.290
So if you are saying, okay, great, I love
the concept of being on this live stream.
00:03:22.290 --> 00:03:24.390
I love that Cloudinary is
talking with developers.
00:03:24.630 --> 00:03:29.400
Well, note that you can always go to
cloudinary.com/podcasts for all the
00:03:29.400 --> 00:03:33.000
previous episodes because we've been doing
this for about two years now, talking
00:03:33.000 --> 00:03:36.450
with developers like Grant and others
that are really pushing the boundaries
00:03:36.450 --> 00:03:40.470
of what images and videos are in the
web, and of course, mobile as well.
00:03:40.920 --> 00:03:44.430
So you can always go to
cloudinary.com/podcasts for all of that.
00:03:44.800 --> 00:03:48.810
And we of course want to emphasize
our Cloudinary community.
00:03:48.810 --> 00:03:51.810
So if you hear some great conversations
Load full transcript
that are happening here and you
00:03:51.810 --> 00:03:55.980
want to keep those going, you can
always pop over to Cloudinary.
00:03:56.340 --> 00:03:57.570
So community.
00:03:57.570 --> 00:04:01.200
So that's gonna be
community.cloudinary.com, and that's gonna
00:04:01.200 --> 00:04:05.220
be at the main space where you can see all
of the content that happens to be there.
00:04:06.015 --> 00:04:11.265
So let's go ahead and bring Grant on
and have a little bit of detail about
00:04:11.265 --> 00:04:14.804
what he's been doing at Formidable and
being able to optimize that content.
00:04:14.924 --> 00:04:17.505
So Grant, welcome to the episode.
00:04:17.875 --> 00:04:18.255
Grant Sander: Hello.
00:04:18.255 --> 00:04:18.685
Hello.
00:04:20.055 --> 00:04:22.905
Sam Brace: Grant, obviously I've
been very impressed with all the work
00:04:22.909 --> 00:04:26.055
that you're doing, all the work that
Formidable is doing, but maybe people
00:04:26.055 --> 00:04:28.395
that are listening to this, this is
their first time encountering you.
00:04:28.395 --> 00:04:31.365
So tell us a little bit about you,
a little bit about Formidable.
00:04:32.354 --> 00:04:34.965
Grant Sander: Yeah, so maybe
we start with Formidable.
00:04:34.965 --> 00:04:37.784
Formidable is a digital
design and development agency.
00:04:37.844 --> 00:04:43.155
We do dev work, design work, product
work for companies of varying sizes,
00:04:43.155 --> 00:04:47.235
anywhere from like smaller startups all
the way up to, fortune 100 companies.
00:04:47.235 --> 00:04:52.155
So we've got, a wide portfolio
and we do a lot, we focus a lot
00:04:52.159 --> 00:04:54.825
on modern JavaScript tooling.
00:04:54.855 --> 00:04:57.255
So we're, we, were pretty
early in the React space.
00:04:57.255 --> 00:05:00.315
We do a lot of work with Modern
React, do a lot with Next Js,
00:05:01.005 --> 00:05:02.205
React Native is another big one.
00:05:02.205 --> 00:05:07.005
We do a lot of like cross platform,
mobile work on the engineering side
00:05:07.005 --> 00:05:10.755
of things, as well as all the fun
design system, product type stuff.
00:05:10.755 --> 00:05:13.725
So that's like at a high
level what Formidable does.
00:05:13.725 --> 00:05:18.755
We help companies build cool
things and help level up their
00:05:18.770 --> 00:05:20.805
engineers to, to build cool things.
00:05:21.625 --> 00:05:23.315
That's Formidable.
00:05:23.315 --> 00:05:27.545
I am just another engineer I suppose.
00:05:28.555 --> 00:05:33.495
Recently, I am now a VP of engineering
at Formidable, which is a scary title.
00:05:33.905 --> 00:05:39.705
But yeah I basically help client teams
succeed, help with like client facing
00:05:39.705 --> 00:05:43.575
work, but also involved in partnership
things, and so like you mentioned,
00:05:43.735 --> 00:05:45.435
Formidable and Cloudinary are partners.
00:05:45.435 --> 00:05:48.495
We're an agency partner of
Cloudinary, so do a lot of like
00:05:48.615 --> 00:05:50.565
partnership engagement and also
00:05:51.860 --> 00:05:54.635
sort of help lead the open
source initiatives at Formidable?
00:05:54.635 --> 00:05:58.220
So Formidable does a lot of open
source software work and I help
00:05:58.220 --> 00:06:00.225
with that build tooling around.
00:06:00.525 --> 00:06:03.855
A lot of times it's tooling around
what helps our client team succeed,
00:06:04.155 --> 00:06:07.485
which is nice because if it's helping
our client teams succeed, it's
00:06:07.605 --> 00:06:10.070
often helping other teams succeed.
00:06:10.070 --> 00:06:14.155
So involved in a handful of
different things at Formidable.
00:06:14.715 --> 00:06:19.605
Sam Brace: Which is fantastic because it's
where you have a lot of concepts of what's
00:06:19.605 --> 00:06:22.815
working for your clients that you're
working with, what's working well for
00:06:22.815 --> 00:06:26.295
the various partners, as you mentioned,
working with Cloudinary and others.
00:06:26.475 --> 00:06:29.625
And then even on top of that, being
able to understand the brand presence.
00:06:29.625 --> 00:06:32.925
So you have a lot of hands and lots
of pots, but that's a great place for
00:06:32.925 --> 00:06:34.245
us to be at with a guest like you.
00:06:34.250 --> 00:06:37.545
So this is fantastic that you're involved
with all of those different efforts.
00:06:37.815 --> 00:06:40.125
One thing I wanted to ask you
about, because you mentioned
00:06:40.125 --> 00:06:42.615
some of the programming languages
that you guys are working with at
00:06:42.620 --> 00:06:45.675
Formidable, and you mentioned React
you also mentioned React Native.
00:06:46.005 --> 00:06:47.115
Talk to me a little bit about that.
00:06:47.115 --> 00:06:50.355
Why are some of these choices being made
is, are you guys necessarily calling
00:06:50.355 --> 00:06:53.925
yourselves a JavaScript shop or is
it where you're focusing on certain
00:06:53.925 --> 00:06:55.965
frameworks because of certain reasons?
00:06:55.965 --> 00:06:57.375
What's the intention behind that?
00:06:58.245 --> 00:06:58.605
Grant Sander: Yeah.
00:06:58.765 --> 00:07:04.055
In consulting it depends on what
business you can get, although it's a
00:07:04.055 --> 00:07:07.395
chicken and egg problem where you've
gotta have engineers to staff things.
00:07:07.395 --> 00:07:13.125
And so we've been, pretty early in
the JavaScript that was where, when
00:07:13.125 --> 00:07:16.995
Formidable was a small agency, that was
the type of work that we were doing.
00:07:16.995 --> 00:07:20.780
And we've just grown to be well
known in the JavaScript community.
00:07:20.780 --> 00:07:25.515
So that's been our strength for
many years is, has been JavaScript.
00:07:25.805 --> 00:07:31.695
And this predates my time at
Formidable by a number of years, but
00:07:31.995 --> 00:07:34.094
Formidable is also early to React.
00:07:34.094 --> 00:07:38.594
I think, early engineers at Formidable
kind of saw, saw that React was
00:07:38.594 --> 00:07:40.005
gonna be the next big
thing.
00:07:40.005 --> 00:07:43.664
And so we, we did a lot of work in the
open source community with React and
00:07:43.664 --> 00:07:49.375
helping some larger clients with React
work that were also early adopters,
00:07:49.375 --> 00:07:54.674
and we just rode that wave and then
React Native came onto the scene and
00:07:55.424 --> 00:08:00.000
it's been a, it's been a great choice
for a lot of companies allowing, allowing
00:08:00.000 --> 00:08:03.994
us to help people build cross platform
mobile apps, which is a pretty big deal.
00:08:03.994 --> 00:08:07.484
I mean ,that's the selling point of React
Native is you can have one engineering
00:08:07.484 --> 00:08:10.515
team building for both iOS and Android.
00:08:11.255 --> 00:08:14.580
With React, there's differences
between web and mobile, but a lot of
00:08:14.580 --> 00:08:18.210
your React engineers that are doing
web work can also get cross-trained
00:08:18.299 --> 00:08:20.039
onto mobile development as well.
00:08:20.039 --> 00:08:27.090
So those are the reason why, we've been
big on React and React Native is that,
00:08:27.090 --> 00:08:28.500
that's the thing we've been using,
00:08:28.500 --> 00:08:31.680
and also just our, React's
got a big community.
00:08:31.770 --> 00:08:33.179
There's a lot of client work to be done.
00:08:33.179 --> 00:08:35.309
A lot of larger companies
are choosing React.
00:08:35.309 --> 00:08:36.780
They have been for quite a while.
00:08:36.780 --> 00:08:40.559
Reacts held the throne it seems
like for quite a while now.
00:08:42.140 --> 00:08:44.189
We're going where the market goes.
00:08:44.189 --> 00:08:45.910
We also like react quite a bit.
00:08:45.949 --> 00:08:51.990
It's a pretty pretty nice framework
and makes our lives quite a bit easier.
00:08:52.110 --> 00:08:55.560
But in later years, TypeScript
has been pretty big.
00:08:55.560 --> 00:08:58.980
So now we consider ourselves
a TypeScript shop as well in
00:08:58.980 --> 00:09:00.329
terms of programming languages.
00:09:00.329 --> 00:09:05.465
We do a lot of work with Typescripts,
help clients migrate to Typescripts.
00:09:06.235 --> 00:09:07.095
Which has been great.
00:09:07.575 --> 00:09:11.985
And we also have, we have engineers
doing Rust and Go Lang as well.
00:09:11.985 --> 00:09:15.315
So we do some more additional languages.
00:09:15.375 --> 00:09:16.785
It's not the bulk of our work.
00:09:16.785 --> 00:09:19.095
A lot of our backend work is still node.
00:09:19.095 --> 00:09:21.195
We do a lot of, like a
lot in the GraphQL space.
00:09:21.195 --> 00:09:25.745
This is another space we've been pretty
big in and early adopters is GraphQL.
00:09:25.745 --> 00:09:30.855
And we, a lot of our like backend
GraphQL type work is often in node.
00:09:30.945 --> 00:09:34.995
Node seems to be Node.js seems to
have I think probably the most mature
00:09:34.995 --> 00:09:39.465
like GraphQL ecosystem and that's
fit well with like our expertise.
00:09:39.645 --> 00:09:46.125
So definitely, big JavaScript company,
but we also do, Rust has been getting a
00:09:46.125 --> 00:09:47.465
lot of attention, which has been cool.
00:09:47.465 --> 00:09:50.325
And so we've been
dabbling in Rust as well.
00:09:51.255 --> 00:09:54.435
Sam Brace: I love the fact that, you
have all of these different viewpoints.
00:09:54.435 --> 00:09:57.165
You're touching all of these
different frameworks because it
00:09:57.165 --> 00:09:59.955
really does show that you're able to
provide a wealth of expertise to the
00:09:59.955 --> 00:10:01.275
clients that you are working with.
00:10:01.280 --> 00:10:02.385
And that's fabulous.
00:10:02.385 --> 00:10:05.444
And of course, I love the fact that
Cloudinary is an arrow in your overall
00:10:05.450 --> 00:10:08.805
quiver too, that you can bring that
in to all the discussions, which
00:10:08.805 --> 00:10:10.305
kind of brings us to your project.
00:10:10.335 --> 00:10:16.305
So as we know you, we mentioned
that you have Formidable, which is a
00:10:16.425 --> 00:10:20.025
overall agency, working with clients
on all sorts of design and development
00:10:20.030 --> 00:10:24.525
efforts, but then you also have your
main brand presence, so formidable.com.
00:10:24.885 --> 00:10:29.235
Talk to me about what your decision
making was with the website and why
00:10:29.235 --> 00:10:32.955
you decided to maybe go in a different
route when it came to the ways that
00:10:32.955 --> 00:10:36.345
you were working with images for that
site versus what you're doing today.
00:10:37.545 --> 00:10:42.725
Grant Sander: Yeah, so a number of years
ago we had migrated our formidable.com,
00:10:42.750 --> 00:10:46.950
like our agency website to a stack
of, we were using React Static, which
00:10:46.950 --> 00:10:51.570
was like, now considered an older
framework, but it was a way for us
00:10:51.570 --> 00:10:55.740
to generate static webpages, which is
great for an agency site like ours that
00:10:55.745 --> 00:10:58.040
doesn't have a ton of dynamic content.
00:10:58.040 --> 00:11:01.770
We'll change things like every week,
every other week, but that's like a
00:11:01.770 --> 00:11:08.490
pretty low frequency, for changes, and we
were working with a stack of Ref Static.
00:11:08.550 --> 00:11:13.560
We were using Netlify CMS for allowing
our like marketing team to author content
00:11:13.560 --> 00:11:16.230
in a, like a GUI, a visual interface.
00:11:16.620 --> 00:11:19.460
And then when they would make those
changes, basically what would happen
00:11:19.460 --> 00:11:24.060
is it would commit those changes
right into our git repository.
00:11:24.270 --> 00:11:28.890
So our entire website was totally git
driven at at the end of the day, and
00:11:28.890 --> 00:11:33.100
so this was pretty nice for us, in
terms of the development teams we have,
00:11:33.850 --> 00:11:35.760
that's a pretty natural flow for us.
00:11:36.555 --> 00:11:41.355
But when everything is static and it's
just like a straight up React site and
00:11:41.355 -->
00:11:47.505
everything is handled locally through the
git repository, images become a sticking
00:11:47.505 --> 00:11:51.615
point because carrying around a ton of
images, like all the images you need
00:11:51.615 --> 00:11:56.625
for like blog posts or case studies or
whatever other kind of content you have
00:11:56.715 --> 00:12:00.675
on your site and like we don't even really
have user generated images and we still
00:12:00.675 --> 00:12:03.314
had a pretty, pretty hefty load of images.
00:12:04.244 --> 00:12:08.775
And it was a burden to try to
have, say like our content authors
00:12:08.775 --> 00:12:12.435
or whoever's generating images
be very like in tune with like,
00:12:12.675 --> 00:12:14.324
how many megabytes is your image?
00:12:14.385 --> 00:12:15.954
What format is your image?
00:12:15.954 --> 00:12:21.455
And that's a lot to ask of a content
author to, to be like super, concerned
00:12:21.455 --> 00:12:25.305
with the nitty gritties of their
images that they're uploading.
00:12:26.025 --> 00:12:31.305
So we've been migrating our site to
try well React Static is, has been at
00:12:31.310 --> 00:12:33.615
end of life for a more than a year now.
00:12:33.615 --> 00:12:35.964
So we were in the process
of migrating off of that.
00:12:36.594 --> 00:12:41.084
Netlify CMS has been great also
slowing down in this development.
00:12:41.084 --> 00:12:45.449
And we were looking towards something,
we're moving towards sanity, which is
00:12:45.449 --> 00:12:50.175
another CMS that has been great for
us and allows us to provide content.
00:12:50.175 --> 00:12:52.064
So we've been talking about migration.
00:12:52.485 --> 00:12:56.849
Images, were like the biggest baggage
in terms of like our existing flow,
00:12:57.310 --> 00:13:01.980
and sort of the lowest, like lowest
hanging fruit to some degree.
00:13:01.980 --> 00:13:05.660
It was like the most bang for buck
in terms of our migration, which
00:13:06.920 --> 00:13:11.550
is great, especially because like
most websites are very image heavy.
00:13:11.550 --> 00:13:14.520
I think images make up, I dunno,
we could probably Google the
00:13:14.520 --> 00:13:17.760
statistic, but the majority of
like web bandwidth is just images.
00:13:17.760 --> 00:13:23.040
And optimizing images is a great first
thing to do in terms of, saving bandwidth,
00:13:23.340 --> 00:13:25.890
improving speed, things like that.
00:13:28.230 --> 00:13:31.440
Jen Brissman: So was there an actual
problem or what was the actual problem
00:13:31.445 --> 00:13:34.710
that led you to look for an alternative
in the way that your images were handled?
00:13:34.710 --> 00:13:39.830
Were you experiencing any downsides
to the way you were doing it before?
00:13:39.830 --> 00:13:42.570
And how did you know, okay,
Cloudinary is our solution?
00:13:42.810 --> 00:13:43.980
Grant Sander: Yeah, so we.
00:13:44.945 --> 00:13:50.685
When you have 1200 or 1500 images checked
into your Git repository, like pulling the
00:13:50.685 --> 00:13:55.329
repo down, like cloning the repo, moving
things around, it gets pretty heavy.
00:13:55.329 --> 00:13:56.209
It gets chunky.
00:13:56.209 --> 00:13:59.835
You end up with just like gigabytes
of images that are in there.
00:14:00.225 --> 00:14:06.115
And we had a workflow for basically
using Sharp, which is a a node library,
00:14:06.135 --> 00:14:11.100
a very high performance like image
transformation processing library.
00:14:11.490 --> 00:14:17.100
And so we knew that we wanted to deliver
sort of NextGen images, and so we had
00:14:17.100 --> 00:14:21.990
a process for like turning our original
image assets into WebP versions, which
00:14:22.050 --> 00:14:24.690
WebP is like a, NextGen image format.
00:14:24.690 --> 00:14:28.980
Although now I'm wondering if it's
still considered NextGen or not, there's
00:14:28.980 --> 00:14:32.370
some other players in the space, but we
could probably loop back around to that.
00:14:32.370 --> 00:14:37.610
But we had a process for taking just a
straight up jpeg, turning it into a WebP
00:14:37.710 --> 00:14:41.220
and it would get committed right back
into our repository so that, because
00:14:41.220 --> 00:14:45.780
we were serving those images out, so
we were now, if you had 1500 source
00:14:45.780 --> 00:14:51.150
images, we really had 3000 because
we were creating these WebP versions.
00:14:51.870 --> 00:14:53.880
That weren't being resized
or compressed at all.
00:14:53.880 --> 00:14:56.310
They were like literally just
converting the format of them.
00:14:56.970 --> 00:15:01.230
We were, we had a workflow for trying
to reduce some image bandwidth on
00:15:01.230 --> 00:15:05.630
the site by serving WebPs where like
you could, where there's browser
00:15:05.630 --> 00:15:07.950
support for, that's pretty good.
00:15:07.955 --> 00:15:13.290
But yeah we were running into this thing
where our repo had a lot of baggage and
00:15:13.290 --> 00:15:18.900
managing our images and getting everything
to process our original assets into WebP.
00:15:19.110 --> 00:15:20.850
It was just a very clunky workflow.
00:15:21.530 --> 00:15:26.390
And when we were looking towards I don't
know, resizing images or using something
00:15:26.390 --> 00:15:33.380
like avif, like more, more like efficient
image formats it was gonna be daunting.
00:15:33.380 --> 00:15:36.320
It was gonna be like the multiplicative
effect of now you're gonna need, for
00:15:36.320 --> 00:15:40.875
every source image, you're gonna need
four generated images stashed in there.
00:15:41.255 --> 00:15:44.660
We were looking at just like totally
bogging down our get repository.
00:15:44.970 --> 00:15:49.400
Also just like realistically wasting
engineering hours trying to create
00:15:49.400 --> 00:15:54.465
our own subpar version of image
processing and delivery, which is just,
00:15:55.245 --> 00:15:56.480
we try to avoid that at Formidable.
00:15:56.510 --> 00:16:00.650
We often advise our clients to pick
the solution that requires the least
00:16:00.650 --> 00:16:06.290
amount of dev effort, which is generally
like good advice unless you're in
00:16:06.290 --> 00:16:08.700
like a very specific edge case.
00:16:08.850 --> 00:16:11.790
And so we figured, it was time
for us to take our own advice.
00:16:11.790 --> 00:16:15.600
We would, we would probably never tell
our own clients to check all of their
00:16:15.605 --> 00:16:19.980
images and to get, we would be pushing
them towards image hosting solutions.
00:16:19.980 --> 00:16:22.860
And so it was just a matter of time
for us to get caught up on our own site
00:16:24.050 --> 00:16:26.490
Sam Brace: Well, I think it's smart
what you did, because it's something
00:16:26.700 --> 00:16:29.940
that we hear continually when we start
talking about headless architecture
00:16:29.940 --> 00:16:31.320
and composable architecture.
00:16:31.470 --> 00:16:34.620
A lot of the conversations around choosing
what they call best of breed, right?
00:16:34.650 --> 00:16:37.980
Which is where there's lots of
vendors that do something correctly.
00:16:38.190 --> 00:16:41.490
Don't try to replicate the wheel,
don't try, do something that
00:16:41.495 --> 00:16:42.870
somebody already is spending in.
00:16:43.755 --> 00:16:47.115
Thousands, if not hundreds of thousands
of R&D hours in to understand.
00:16:47.415 --> 00:16:50.954
So as you said, serving
everything as a WebP.
00:16:51.015 --> 00:16:51.925
Yeah, that makes sense.
00:16:51.925 --> 00:16:57.165
WebP is ultimately something that's
meant to supersede jpeg, PNG, et cetera.
00:16:57.344 --> 00:17:02.355
But in the same sense, now you're able
to deliver things as AVIFS or JPEG excels
00:17:02.355 --> 00:17:04.065
or whatever you wanna be able to use.
00:17:04.065 --> 00:17:08.565
So it allows for people to be able to
say, we got the format situation for you.
00:17:08.665 --> 00:17:09.214
It's okay.
00:17:09.230 --> 00:17:11.504
You don't have to send all
the engineering hours on it.
00:17:11.534 --> 00:17:15.194
So I like the approach that you
ultimately took with this effort to
00:17:15.194 --> 00:17:19.395
know that when do we want to really
make that investment versus when
00:17:19.395 --> 00:17:21.944
do we wanna go with someone that's
already made that investment for us.
00:17:21.974 --> 00:17:24.165
So that very good choice on your part.
00:17:24.855 --> 00:17:28.230
What I would love to talk about
Grant, as you can see here, we have
00:17:28.230 --> 00:17:31.620
a whole blog post that is written on
the formidable site, which we also
00:17:31.620 --> 00:17:33.000
have linked here in the show notes.
00:17:33.210 --> 00:17:35.280
And it's gonna outline a lot
of the things that we're gonna
00:17:35.280 --> 00:17:36.660
be talking about here today.
00:17:36.690 --> 00:17:40.440
But what I would love for us to be
able to do is take a look at some of
00:17:40.445 --> 00:17:43.920
the codes, some of the details that
you have here that really breaks down
00:17:43.920 --> 00:17:45.690
this particular sentence right here.
00:17:45.960 --> 00:17:49.500
The fact that you were able to do some
things where you were able to reduce
00:17:49.500 --> 00:17:54.510
that image bandwidth by 86% across 30
of your most front facing web pages.
00:17:54.540 --> 00:17:57.810
So I'm gonna pop over your screen here
and we can start walking through some
00:17:57.815 --> 00:18:00.240
of the stuff that you're able to do
it from middle to make this possible.
00:18:00.990 --> 00:18:01.290
Grant Sander: Cool.
00:18:05.130 --> 00:18:09.270
Yeah, I think we could step through
this blog post a little bit.
00:18:09.270 --> 00:18:14.160
I also have these code snippets from
the blog post pulled out into a GitHub
00:18:14.160 --> 00:18:18.540
gist, which I will probably jump over to
cuz it's a little easier to read here.
00:18:18.545 --> 00:18:24.380
And we have line numbers, but Just wanted
to talk first about like big picture idea
00:18:24.550 --> 00:18:27.015
of okay, we wanna migrate to Cloudinary.
00:18:27.045 --> 00:18:31.545
What was our mental model for
executing a migration of all
00:18:31.545 --> 00:18:32.715
of our images on our site.
00:18:33.285 --> 00:18:38.655
So this little image here sums
this up where we took a four step
00:18:38.655 --> 00:18:42.405
approach of, and that might be a
little small, but the first step was
00:18:42.675 --> 00:18:47.715
upload our entire image library from
our Git repository up to Cloudinary.
00:18:47.925 --> 00:18:52.665
That's pretty low stakes and honestly, I
botched it a couple times in the process,
00:18:52.670 --> 00:18:56.945
but was able to nuke my like folder and
Cloudinary and then just do it again.
00:18:56.945 --> 00:18:59.955
And there's a little bit of trial
and error there, but uploading it
00:18:59.955 --> 00:19:02.865
first was like, I could test it.
00:19:03.255 --> 00:19:05.085
I wasn't actually changing
anything on the website.
00:19:05.090 --> 00:19:06.765
So that's no harm, no foul.
00:19:07.005 --> 00:19:10.845
So step one was just like taking the
images from where we had them and getting
00:19:10.845 --> 00:19:15.285
them into Cloudinary in a way that
allowed us to do our migration across
00:19:15.285 --> 00:19:16.665
the website and all of our content.
00:19:18.105 --> 00:19:21.254
So the second step was migrating
the image URLs in our content.
00:19:21.435 --> 00:19:25.365
So once our, once we have like the
media library and Cloudinary's DAM,
00:19:25.365 --> 00:19:28.335
their digital asset M is for what?
00:19:28.395 --> 00:19:29.024
Management?
00:19:29.030 --> 00:19:29.175
Sam Brace: Management.
00:19:29.175 --> 00:19:29.575
Management.
00:19:29.835 --> 00:19:30.044
Grant Sander: Yeah.
00:19:30.135 --> 00:19:30.345
Okay.
00:19:30.345 --> 00:19:32.005
DAM Library, whatever
we're calling that thing.
00:19:32.425 --> 00:19:36.675
Once it's up there, we need a way to, like
all of our content was in markdown ,files.
00:19:36.679 --> 00:19:39.945
We were, we had a very
markdown driven site.
00:19:39.975
--> 00:19:43.725
We needed to go into all those
markdown files and change all of the
00:19:43.725 --> 00:19:48.375
image paths from like a relative path
because everything was in the same like
00:19:48.379 --> 00:19:49.995
repository served outta the same bucket.
00:19:50.000 --> 00:19:54.675
We were using relative image paths for
all of our image tags, and we needed
00:19:54.675 --> 00:19:59.745
to update those to be like, fully
qualified URLs pointing to Cloudinary,
00:20:00.254 --> 00:20:03.044
and have it, point to the right image.
00:20:03.314 --> 00:20:07.425
So this was the hard part was
like getting that migration and
00:20:07.425 --> 00:20:10.240
automating that out so we didn't
have to do a bunch of manual work.
00:20:10.880 --> 00:20:12.480
So writing the migration script for that.
00:20:13.020 --> 00:20:15.540
Sam Brace: So talk to me about that,
because I agree with what you said.
00:20:15.540 --> 00:20:17.210
That sounds challenging.
00:20:17.280 --> 00:20:20.250
So how, what were some of the steps
that you remember having to take
00:20:20.250 --> 00:20:22.649
when you were talking about that
migration script to make sure that
00:20:22.649 --> 00:20:26.520
everything was going from the relative
to the situation that you have now?
00:20:27.350 --> 00:20:30.780
Grant Sander: Yeah, we could probably
jump into some code if you'd like.
00:20:30.840 --> 00:20:32.100
That might be the easiest way.
00:20:32.310 --> 00:20:34.990
Maybe the easiest way to do this
is just jump right into some code.
00:20:35.450 --> 00:20:38.129
Do you wanna start there or do
we wanna start with uploading
00:20:38.129 --> 00:20:39.270
the library to Cloudinary?
00:20:40.080 --> 00:20:41.820
Sam Brace: Actually, yeah, if you
wanna take a step back and talk about
00:20:41.820 --> 00:20:43.170
the uploading part, that'd be awesome.
00:20:43.200 --> 00:20:43.260
Grant Sander: Yeah.
00:20:43.264 --> 00:20:45.090
Sam Brace: And then we can jump
back and talk about testing once
00:20:45.095 --> 00:20:46.409
we go through the first two steps.
00:20:46.409 --> 00:20:46.680
Yeah.
00:20:46.740 --> 00:20:47.639
Grant Sander: Yeah, that sounds great.
00:20:48.090 --> 00:20:52.960
And honestly, the uploading the Cloudinary
was probably the easiest part I think.
00:20:52.960 --> 00:20:58.830
Cloudinary offers a lot of
SDKs and even like REST APIs
00:20:58.830 --> 00:21:00.210
that are very easy to use and.
00:21:01.730 --> 00:21:05.860
JavaScript, I mentioned we do a lot
of JavaScript at Formidable we just
00:21:05.860 --> 00:21:11.240
wrote a little, a "JavaScript" as
they call them, to migrate these.
00:21:11.970 --> 00:21:13.400
To migrate our images up.
00:21:14.220 --> 00:21:18.540
As you can see in this code snippet
here, we are using the Cloudinary
00:21:18.570 --> 00:21:23.700
Node SDK, which is pretty great
that, it made life very easy.
00:21:23.700 --> 00:21:25.890
So we have a lot of like configuration.
00:21:26.310 --> 00:21:29.280
We had some baggage from our site
where like over the years we had
00:21:29.280 --> 00:21:32.910
changed how things were structured
and so the places where our images
00:21:32.940 --> 00:21:34.560
lived had changed over time.
00:21:34.770 --> 00:21:37.500
So there were some like weird edge
cases that I'll point out here,
00:21:37.500 --> 00:21:40.130
but I don't want us to get bogged
down too much in those details.
00:21:41.420 --> 00:21:47.040
So we configured our Cloudinary
SDK just, I omitted like our
00:21:47.045 --> 00:21:49.920
cloud name, API Key, API Secret.
00:21:49.980 --> 00:21:55.280
I also only ever ran those as a
process arg, so you had to pass those
00:21:55.280 --> 00:21:59.940
into a CLI command so that I never
accidentally commit those into Git,
00:22:00.270 --> 00:22:01.975
even though Git respository is private.
00:22:01.975 --> 00:22:06.880
But, good practice not to commit
your API secret into your repository.
00:22:07.640 --> 00:22:11.100
Configuring that, this just got passed
in through a command line argument.
00:22:12.240 --> 00:22:17.865
And that sets up the Cloudinary SDK,
and then I just have this main function,
00:22:17.865 --> 00:22:19.965
which runs when I call the script.
00:22:19.965 --> 00:22:24.375
So I have, this is the bulk of things,
but this is just a JavaScript file.
00:22:24.465 --> 00:22:25.395
I'm gonna scroll way down.
00:22:25.845 --> 00:22:28.575
At the bottom, I'm just
running this main command.
00:22:28.605 --> 00:22:30.615
And so this is pretty,
pretty common practice.
00:22:30.615 --> 00:22:33.735
If you're writing a Node script,
you just write a function, call
00:22:33.740 --> 00:22:37.245
it at the end, and log out an
error if something bad happened.
00:22:37.305 --> 00:22:42.915
But, so this main function
is the bulk of stuff.
00:22:42.915 --> 00:22:46.875
So one of the things that I've been
bitten in the past is if you have a long
00:22:46.875 --> 00:22:51.855
running script that's doing an operation
over and over again, if something
00:22:51.855 --> 00:22:55.815
fails halfway through or a process gets
corrupted and like your thing stops,
00:22:56.065 --> 00:22:58.665
it's good to save your work as you go.
00:22:58.665 --> 00:23:01.365
So you know what's been uploaded
and what hasn't been uploaded.
00:23:01.605 --> 00:23:05.265
So if you're uploading 1500 images,
keep track of the ones that have
00:23:05.265 --> 00:23:08.835
been successfully uploaded so you
don't have to redo those in case
00:23:08.840 --> 00:23:11.065
like something falls over or fails.
00:23:12.565 --> 00:23:17.040
Learn those from field combat
of not doing that in the past.
00:23:17.399 --> 00:23:20.159
So this is just like a status map
where I just like literally had a
00:23:20.159 --> 00:23:22.170
JSON file that I would write to.
00:23:23.050 --> 00:23:23.470
Sam Brace: Okay.
00:23:23.620 --> 00:23:26.240
Grant Sander: That, so as images
were being processed, you just
00:23:26.520 --> 00:23:30.179
create a record in a JSON file that's
just like the image
name and then
00:23:30.269 --> 00:23:32.040
whether or not it succeeded or not.
00:23:32.280 --> 00:23:36.090
And then when you start the script up,
we use that to check like which ones are
00:23:36.389 --> 00:23:37.770
already uploaded and which ones aren't.
00:23:38.430 --> 00:23:41.790
Not super important, but a fun little
call out of if you're doing a long
00:23:41.790 --> 00:23:45.959
running process, probably good to
track your progress as you go in
00:23:45.959 --> 00:23:47.310
case you have to restart that thing.
00:23:48.090 --> 00:23:48.729
Sam Brace: Smart.
00:23:50.199 --> 00:23:50.540
Jen Brissman: Totally.
00:23:50.540 --> 00:23:53.235
Grant Sander: So this is,
this looks pretty ugly.
00:23:53.235 --> 00:23:58.695
It's not super pretty code, but
what I wanted to do was grab all the
00:23:58.700 --> 00:24:03.405
source images from our repository
and we, like I said, we had images
00:24:03.410 --> 00:24:04.755
living in different folders.
00:24:04.755 --> 00:24:08.505
And so I have this configured in like
a configuration file, but this asset
00:24:08.510 --> 00:24:13.485
roots is like just an array of like
paths to the folders where images lived.
00:24:14.325 --> 00:24:18.975
So using this library Glob, which
is a super cool library, I find
00:24:18.975 --> 00:24:21.065
myself using Glob all the time.
00:24:21.875 --> 00:24:25.855
There's a lot of libraries in the
space for globing stuff, but basically
00:24:25.880 --> 00:24:30.465
allows you to point to a folder and
then just write like a glob statement
00:24:30.465 --> 00:24:33.735
like this where it says, "Hey, go
ahead and search through everything
00:24:33.975 --> 00:24:38.295
nested under there and find me all
of the files with these extensions."
00:24:38.295 --> 00:24:42.365
And so this is a pretty easy
way to go find all those images.
00:24:42.445 --> 00:24:48.225
PNGs, JPEGs, SVGs, GIFs, the
whole kit and caboodle there.
00:24:48.915 --> 00:24:51.405
Sam Brace: Yeah, it definitely comprises
everything that you would've had
00:24:51.405 --> 00:24:52.725
there prior to moving to Cloudinary.
00:24:52.725 --> 00:24:53.475
That makes sense.
00:24:53.865 --> 00:24:54.315
Grant Sander: Yeah.
00:24:54.405 --> 00:24:56.955
And then once I have found all
those from the folders, just
00:24:56.955 --> 00:24:58.635
flatten that out into a flat array.
00:24:59.385 --> 00:25:04.215
And then there's some extra stuff here
of this was just like cleaning up some
00:25:04.220 --> 00:25:07.965
stuff we didn't want, we wanted to filter
out the WebP generated files, which
00:25:07.965 --> 00:25:10.635
had a specific, like prefix on 'em.
00:25:10.875 --> 00:25:15.255
Also clean up the path a little bit,
just removing like the prefix, so
00:25:15.255 --> 00:25:19.775
it doesn't have like user: "Grant
Sander - home", GitHub, whatever.
00:25:19.775 --> 00:25:19.955
Jen Brissman: Right
00:25:19.955 --> 00:25:21.375
Grant Sander: Just removing
the stuff from the beginning.
00:25:21.585 --> 00:25:24.655
And then this is the part where
like checking against the status
00:25:24.680 --> 00:25:28.455
map where it's okay, if it's already
been uploaded, don't do it again.
00:25:28.455 --> 00:25:33.315
So we are only doing this on the
images that are marked as needs upload.
00:25:33.945 --> 00:25:36.260
So we have all of our image
files that we wanna upload.
00:25:36.540 --> 00:25:41.730
That's not too bad.
00:25:42.179 --> 00:25:45.389
And then what I'm doing is
I'm gonna skip a couple things
00:25:45.389 --> 00:25:46.740
that aren't super important.
00:25:47.280 --> 00:25:49.530
What I did was ended up
like batching the upload.
00:25:50.129 --> 00:25:54.289
Cloudinary does have some
rate limiting in place.
00:25:54.289 --> 00:26:01.020
And I tried to like upload 50 images
at a time and like I hit some rate
00:26:01.020 --> 00:26:04.350
limiting issues and I was like,
okay, let's just, I have time.
00:26:04.350 --> 00:26:07.710
I can run this and go eat dinner,
so I just batched it at size two.
00:26:08.179 --> 00:26:09.379
But you can control that.
00:26:09.395 --> 00:26:11.879
And so what I'm doing is
uploading two images at a time.
00:26:11.885 --> 00:26:16.169
And so this is there's some logic
here for doing, like batching up some
00:26:16.169 --> 00:26:21.149
stuff, but at the end of the day to
upload an image, it's like literally
00:26:21.149 --> 00:26:24.780
just cloudinary.uploader and then
there's an upload method and you
00:26:24.780 --> 00:26:28.140
just pass in the path of the thing.
00:26:28.140 --> 00:26:28.230
Sam Brace: Yep.
00:26:28.800 --> 00:26:30.760
Grant Sander: And that's
pretty, pretty darn simple.
00:26:30.760 --> 00:26:35.050
So there's some complex stuff here,
but it's only because the complexity of
00:26:35.330 --> 00:26:39.180
the repo that I was working in and like
finding the images, but to upload like
00:26:39.180 --> 00:26:44.879
a single image, you just pass it, pass
it a file path and give it a public ID.
00:26:44.879 --> 00:26:49.200
One of the things we had to look out for
was I had to take the path of an image and
00:26:49.200 --> 00:26:53.620
give it, like I had to follow some logic
to give it a public ID which is how you're
00:26:53.620 --> 00:26:55.920
gonna specify which image to like load.
00:26:55.980 --> 00:26:57.950
That's like the key identifier.
00:26:58.560 --> 00:27:00.150
I had to make things deterministic.
00:27:00.150 --> 00:27:03.820
And so there's some cases where we had
some stuff where I had to rename a couple
00:27:03.840 --> 00:27:11.791
files because like we had a, say like
gen.JPG and gen.SVG like the, it's the
00:27:11.796 --> 00:27:13.080
same file name, different extension.
00:27:13.080 --> 00:27:15.960
And that was causing some conflicts
when I was generating public IDs.
00:27:16.140 --> 00:27:17.820
So I had to do a little
bit of cleanup around that.
00:27:17.825 --> 00:27:22.500
But generating out like a deterministic
public ID based on the image path.
00:27:23.250 --> 00:27:23.970
And
we'll use that.
00:27:23.970 --> 00:27:26.699
You'll see that again in the
next step of migrating things.
00:27:27.209 --> 00:27:30.570
I also had a folder all these got uploaded
into the same folder in Cloudinary.
00:27:30.629 --> 00:27:32.399
Super easy just to specify that.
00:27:32.850 --> 00:27:36.659
And then I set the overwrite to true
just in case it's already there.
00:27:36.659 --> 00:27:37.919
I could just re-upload it in case.
00:27:37.919 --> 00:27:40.770
Sam Brace: Yeah, and I actually,
when I was looking at that little
00:27:40.770 --> 00:27:45.899
portion of it right there, line 70
about to 80 or 82 is, that was smart.
00:27:45.959 --> 00:27:49.075
The override situation, cause you
don't want any of your batch processing
00:27:49.199 --> 00:27:52.889
to get hung up because it's saying
it can't override an existing file.
00:27:52.889 --> 00:27:56.340
In case of what you talked about,
where we do wanna override a
00:27:56.340 --> 00:27:58.449
file that's been like sample.JPG.
00:27:58.470 --> 00:28:00.510
Okay, we do need to override
that from what's there.
00:28:00.510 --> 00:28:03.649
So that was smart to make sure the batch
continued and was processed completely.
00:28:04.669 --> 00:28:04.950
Grant Sander: Yeah.
00:28:06.260 --> 00:28:09.270
And then status map once
the image uploads, you set
00:28:09.274 --> 00:28:10.620
the thing on the status map.
00:28:10.709 --> 00:28:14.564
And then I just, again, this
is like not super scientific,
00:28:14.564 --> 00:28:15.865
but it works good enough.
00:28:16.045 --> 00:28:20.154
Every 10 iterations, I'm just
writing out this JSON file.
00:28:20.154 --> 00:28:24.335
So it's like hitting "Command + S"
every time you upload 10 batches.
00:28:24.815 --> 00:28:25.285
Jen Brissman: Totally.
00:28:26.205 --> 00:28:29.139
Grant Sander: Yeah, again, like
that, it's good enough to save
00:28:29.139 --> 00:28:32.240
yourself some time in case something
goes wrong in the middle of it.
00:28:32.240 --> 00:28:34.170
Sam Brace: It sounds like we've
all been burned somehow without
00:28:34.175 --> 00:28:36.000
hitting "Command + S" at some point.
00:28:36.000 --> 00:28:39.100
So putting that logic into what
you're doing here, it makes sense.
00:28:39.430 --> 00:28:43.620
So I like this a lot and frankly, in
my opinion, if we've covered nothing
00:28:43.620 --> 00:28:46.139
else in this episode, and obviously
we're gonna cover more, but if we're
00:28:46.139 --> 00:28:50.040
covering nothing else, to be showing a
clear migration path from something to
00:28:50.070 --> 00:28:55.470
Cloudinary, which you've provided here,
is amazingly useful for the million plus
00:28:55.470 --> 00:28:56.670
developers that are using Cloudinary.
00:28:56.675 --> 00:28:58.649
So this is fantastic information.
00:28:58.699 --> 00:29:01.050
Jen Brissman: Yeah, even including
overwrite: True, and everything
00:29:01.050 --> 00:29:05.639
we just talked about, like line 70
all the way through your check to
00:29:05.639 --> 00:29:07.210
periodically save your progress.
00:29:07.215 --> 00:29:09.300
Like anyone watching, this is open source.
00:29:09.870 --> 00:29:13.110
You could probably take this or
make a similar version of this.
00:29:13.110 --> 00:29:14.129
I totally agree, Sam.
00:29:14.135 --> 00:29:16.910
If people only get this,
it's probably valuable.
00:29:17.340 --> 00:29:18.030
Sam Brace: Absolutely.
00:29:18.090 --> 00:29:18.630
Absolutely.
00:29:19.440 --> 00:29:23.610
So Grant, so we've covered the
point of the migration efforts.
00:29:23.610 --> 00:29:27.330
Is there anything else not the migration
efforts, but the uploading, the library
00:29:27.335 --> 00:29:31.754
of the Cloudinary anything else that's
important to mention about this process?
00:29:32.945 --> 00:29:34.590
Grant Sander: I think
we covered most of it.
00:29:34.830 --> 00:29:38.430
The upload process, like the
Cloudinary, SDK makes it just very easy.
00:29:38.760 --> 00:29:43.560
I think the big part was like, make sure
your public ID- you've gotta keep your
00:29:43.560 --> 00:29:46.860
eyes on the public ID because that's the
thing that you're gonna end up using.
00:29:47.070 --> 00:29:50.250
And so at some point you're gonna
end up using that public ID again.
00:29:50.250 --> 00:29:54.300
So making sure that like you have
some logic for generating, like
00:29:54.360 --> 00:29:57.840
deterministically generating those so
that when you go to migrate your content,
00:29:58.230 --> 00:30:00.090
you can give the proper public ID.
00:30:00.340 --> 00:30:05.400
So I think that's I think this get cloud
name is somewhere else in this gist.
00:30:05.550 --> 00:30:07.320
The details aren't
really that interesting.
00:30:07.320 --> 00:30:13.365
It's based on whatever your own setup
is, but I think the public ID is
00:30:13.365 --> 00:30:14.745
another one just to keep your eyes on.
00:30:14.865 --> 00:30:17.685
But yeah, other than that, I
think that kind of covers the
00:30:17.985 --> 00:30:19.720
gist of the upload process.
00:30:19.950 --> 00:30:20.230
Sam Brace: Yeah.
00:30:20.230 --> 00:30:24.375
And I, and it is something that we push a
lot in training where when we are talking
00:30:24.375 --> 00:30:27.645
to customers, to think about naming
conventions for their files or their
00:30:27.645 --> 00:30:30.645
assets, and public ID is how we do that.
00:30:30.675 --> 00:30:35.735
And I think your example was
perfect where gen.JPG versus gen.SVG
00:30:36.075 --> 00:30:38.475
technically have the same public
ID with the way that Cloudinary
00:30:38.475 --> 00:30:42.425
looks at it because file extension
is not considered as part of that.
00:30:42.425 --> 00:30:44.725
Unless we're talking about
a widely different format.
00:30:44.915 --> 00:30:48.195
If it's gen.MP4 versus gen.JPG, yeah.
00:30:48.254 --> 00:30:50.205
We might be seen as different situations.
00:30:50.445 --> 00:30:54.165
So it is important for them to
people thinking about how do I
00:30:54.165 --> 00:30:57.014
want my
files to be named once
they are migrated to Cloudinary?
00:30:57.044 --> 00:30:59.405
Do we want 'em to stay the same as local?
00:30:59.655 --> 00:31:01.985
Do we want some form of
randomization to prevent overwriting?
00:31:02.000 --> 00:31:03.945
There's lots of ideas around that.
00:31:03.945 --> 00:31:05.925
So I think that was good
for you to focus on that.
00:31:07.185 --> 00:31:07.665
Grant Sander: Nice.
00:31:08.175 --> 00:31:08.355
Cool.
00:31:08.355 --> 00:31:09.044
So then, yeah, I
00:31:09.284 --> 00:31:10.834
...
Sam Brace: We're moving
to migration, right?
00:31:10.834 --> 00:31:13.364
So that's step two of
the four part process?
00:31:13.814 --> 00:31:14.205
Grant Sander: Yeah.
00:31:14.264 --> 00:31:14.445
Yeah.
00:31:14.445 --> 00:31:20.595
Let's talk migration, which I
will go ahead and find that file.
00:31:20.600 --> 00:31:21.314
Let's see.
00:31:23.054 --> 00:31:27.254
Jen Brissman: Yeah, Grant, while you find
that, I just wanted to air your tweet,
00:31:27.254 --> 00:31:32.024
which I, which really made me laugh
where you said "Cloudinary is boss".
00:31:32.294 --> 00:31:34.845
When you tweeted about this blog,
I really got a kick outta that.
00:31:34.845 --> 00:31:38.655
And I know that probably, as you said,
the upload part is relatively simple and
00:31:38.655 --> 00:31:42.254
straightforward, and I'm looking forward
to getting to the code where we talk about
00:31:42.254 --> 00:31:47.324
optimizations and where, what probably
led you to saying Cloudinary is boss.
00:31:49.275 --> 00:31:50.565
Grant Sander: Yeah, that sounds great.
00:31:51.855 --> 00:31:55.665
We'll we'll turn through this
the migration part here to get
00:31:55.665 --> 00:31:57.585
into some more interesting stuff.
00:31:58.215 --> 00:32:02.295
Again, a lot of this has details
around like the specifics of how
00:32:02.300 --> 00:32:03.975
our repository was structured.
00:32:04.275 --> 00:32:08.025
So we'll just touch on some of the like
higher points, some high level points.
00:32:08.235 --> 00:32:11.865
So again, we're gonna, we're gonna do
some "globbin'" in here, which is great.
00:32:12.045 --> 00:32:12.285
Sam Brace: Great.
00:32:12.285 --> 00:32:17.175
Grant Sander: So a similar thing here
of grabbing all of our markdown files.
00:32:17.180 --> 00:32:20.145
So you can see here we're going in
and we're saying, "Hey, inside of
00:32:20.145 --> 00:32:23.865
the content folder, this is where
all of our content files live.
00:32:24.225 --> 00:32:25.515
Give me all the markdown files."
00:32:25.995 --> 00:32:30.045
So now we've got all the files we want
to inspect, and this is the primary
00:32:30.045 --> 00:32:32.405
place where we wanna update URLs.
00:32:33.870 --> 00:32:36.720
So like just looping through the files.
00:32:36.720 --> 00:32:41.850
So four constant files, just loop
through one at a time and doing
00:32:41.855 --> 00:32:45.990
a Node file system, read file,
and just reading out that file.
00:32:45.990 --> 00:32:51.070
So this is like taking a markdown
file, just loading it into memory UTF-8
00:32:51.070 --> 00:32:54.540
encoding, and so we can look at that
and work on it like it's a string.
00:32:54.540 --> 00:32:58.020
So at this point, file contents is like
literally just a string, which is like
00:32:58.020 --> 00:33:01.800
the markdown content that's in there,
which is nice because if you have a string
00:33:02.070 --> 00:33:05.640
you can do whatever sort of shenanigans,
like string shenanigans, you want.
00:33:05.645 --> 00:33:09.240
So I am a sucker for a
good regular expression.
00:33:09.270 --> 00:33:12.540
And we have a nasty one here.
00:33:12.790 --> 00:33:16.129
I don't, I think maybe all regular
expressions look a little bit nasty.
00:33:16.190 --> 00:33:17.670
Sam Brace: I agree, I
definitely agree with that too.
00:33:19.280 --> 00:33:24.390
Grant Sander: So, we won't go too far
into this, but you can pick out a couple
00:33:24.395 --> 00:33:32.330
things here where we're looking for things
that end with PNG, JPG, SVG, GIF, WebP.
00:33:32.790 --> 00:33:37.080
And they also start with, I
mentioned the asset route before.
00:33:37.389 --> 00:33:41.155
Which is like the folders in
which images would live in.
00:33:41.155 --> 00:33:45.030
So it's going and saying, okay, if we see
any, things that start with the forward
00:33:45.035 --> 00:33:49.950
slash and they have the asset folder
name to start, and then they end in like
00:33:49.950 --> 00:33:55.440
a .JPG ,that's gonna be a thing that's
referencing, it's like a relative URL to
00:33:55.440 --> 00:33:57.850
an image that's hosted in our repository.
00:33:58.430 --> 00:34:04.200
So we can use that "r" this is not a
great name, but I'm scripting and so I'll
00:34:04.200 --> 00:34:05.640
give myself a little bit of grace here.
00:34:05.850 --> 00:34:10.770
Using that regular expression, and with
a regular expression, you can pass that
00:34:10.770 --> 00:34:14.970
into the string replace method and you
can actually do logic on these things.
00:34:15.300 --> 00:34:21.780
So this gives us the match itself and
there's a lot of like regular expression
00:34:21.780 --> 00:34:27.900
stuff going on here, but what we're doing
is basically generating the Cloudinary ID.
00:34:27.900 --> 00:34:32.400
This is what the C ID is, and it's using
the GET cloud name that we saw before.
00:34:32.405 --> 00:34:36.290
And this is like the thing that
like took a file path and turned it
00:34:36.290 --> 00:34:40.080
into a, deterministically, turned
it into an ID for Cloudinary to use.
00:34:40.350 --> 00:34:43.200
And here we are using it again because
now we're looking at the file path
00:34:43.560 --> 00:34:48.870
and we gotta say, all right, we need
that file, or we need that Cloudinary
00:34:48.875 --> 00:34:50.970
ID to use as part of this URL.
00:34:51.540 --> 00:34:58.530
So Cloudinary has their own URL
structure for requesting images.
00:34:58.890 --> 00:35:04.500
So we have, we're gonna use our
project ID, image
upload, I set a
00:35:04.500 --> 00:35:07.780
version number on these, which we
could get into some details on there.
00:35:08.464 --> 00:35:10.740
Passing in a folder and then
using the Cloudinary ID.
00:35:10.799 --> 00:35:15.029
So this is how you walk through
each markdown file, you use that
00:35:15.029 --> 00:35:18.060
same function that generated the
ID, and you just use that as the
00:35:18.120 --> 00:35:20.250
last part of this Cloudinary URL.
00:35:20.669 --> 00:35:22.230
And then you just do a little swaperoo.
00:35:22.290 --> 00:35:26.940
You just swap that relative
path for a Cloudinary URL.
00:35:27.380 --> 00:35:32.160
And you write that thing right back into
the markdown file that it came from.
00:35:33.310 --> 00:35:35.256
Jen Brissman: Question for you, Grant.
00:35:35.756 --> 00:35:37.595
Oh, go ahead Sam.
00:35:37.595 --> 00:35:37.865
Sam Brace: No.
00:35:37.865 --> 00:35:38.145
Go ahead.
00:35:38.160 --> 00:35:38.800
You had a great question.
00:35:39.420 --> 00:35:43.020
Jen Brissman: I was just gonna say in
line 42, is that an exhaustive list
00:35:43.020 --> 00:35:45.839
of file extensions that it could be,
or do you have a fallback in case
00:35:45.839 --> 00:35:49.479
there is, something hanging out in
there that, that isn't on that list?
00:35:50.930 --> 00:35:54.545
Grant Sander: Yeah, this for
our case, this was exhaustive.
00:35:54.815 --> 00:36:00.525
We didn't have anything outside
of PNGs JPGs, SVGs, GIFs, WebPs.
00:36:00.545 --> 00:36:03.555
Theoretically it's not exhaustive.
00:36:03.555 --> 00:36:06.065
There's other image formats
that could have been in there.
00:36:06.225 --> 00:36:09.810
And so for our case it was good enough.
00:36:10.450 --> 00:36:13.365
But like you would probably,
like if you were using, what
00:36:13.365 --> 00:36:17.315
are some other image formats?
00:36:17.315 --> 00:36:17.405
Jen Brissman: AVIFs...
00:36:17.405 --> 00:36:19.180
Grant Sander: Other some other images.
00:36:19.480 --> 00:36:21.495
You might also wanna
include those in there.
00:36:21.500 --> 00:36:26.595
But we had, just the vanilla image
format, so it was a little easier for us.
00:36:26.595 --> 00:36:28.635
But yeah, this, you would
wanna update this to cover
00:36:28.635 --> 00:36:31.635
all of your image extensions.
00:36:32.085 --> 00:36:33.945
Jen Brissman: And I guess you
wrote the logic anyway, that if
00:36:33.945 --> 00:36:37.360
something were to break, it would
stop and have saved that batch.
00:36:37.965 --> 00:36:38.825
So there you go.
00:36:38.825 --> 00:36:38.925
Grant Sander: Yeah.
00:36:38.925 --> 00:36:39.065
Yeah.
00:36:39.215 --> 00:36:43.005
And we'll, the next script is actually
like validating that images didn't break.
00:36:43.010 --> 00:36:47.055
And so I had a little bit of a
fallback in case, we had an oopsie.
00:36:47.460 --> 00:36:47.760
Jen Brissman: Yeah.
00:36:48.180 --> 00:36:48.420
Cool.
00:36:48.840 --> 00:36:51.090
Sam Brace: A couple I'm ask you
about here and I think you're
00:36:51.090 --> 00:36:54.660
highlighting it, so yeah, we're saying
the same thing or Grant, but yeah.
00:36:54.690 --> 00:36:59.400
So talk to me about your decision to add
f_auto and q_auto to this overall process.
00:36:59.580 --> 00:37:02.220
Cause I, obviously, I know
what f_auto, q_auto is.
00:37:02.220 --> 00:37:02.720
You know.
00:37:02.750 --> 00:37:03.300
Jen knows.
00:37:03.540 --> 00:37:06.630
But talk to me about your decision
making on what and why you decided
00:37:06.630 --> 00:37:07.650
to add those transformations.
00:37:08.504 --> 00:37:08.834
Grant Sander: Yeah.
00:37:08.834 --> 00:37:14.355
So with Cloudinary's image URL
transformation syntax, you can
00:37:14.355 --> 00:37:18.555
pass in these transformation
parameters that transform the image.
00:37:18.645 --> 00:37:21.855
So if you left out this part
here, we deleted this part out,
00:37:22.185 --> 00:37:24.999
Cloudinary is just gonna serve
you back the original image asset.
00:37:25.560 --> 00:37:31.145
And that's okay, but we mentioned earlier
that a lot of times serving up an original
00:37:31.149 --> 00:37:35.024
image is not the most optimized, it's
almost never the most optimized solution.
00:37:35.174 --> 00:37:35.394
Sam Brace: Correct.
00:37:35.934 --> 00:37:38.955
Grant Sander: Cloudinary, this is one of
the things that I think makes Cloudinary
00:37:38.955 --> 00:37:43.274
so powerful, and makes this sort of
thing low hanging fruit, is this f_auto
00:37:43.274 --> 00:37:49.694
parameter is auto format, which says,
"Hey, your browser requests the image,
00:37:50.055 --> 00:37:54.794
Cloudinary looks at information about the
requesting browser, says what's the best
00:37:54.794 --> 00:37:56.984
image format to use for this browser?"
00:37:56.990 --> 00:37:59.295
So if it's Chrome, it's
probably gonna be like an AVIF.
00:37:59.535 --> 00:38:02.895
If you are like, for some reason on
Internet Explorer 11 or something like
00:38:02.895 --> 00:38:05.714
that, it's gonna choose something else
that's not a next gen because you're
00:38:05.714 --> 00:38:09.155
using a 20 year old, 10 year old, browser.
00:38:10.155 --> 00:38:11.625
And it just serves the best one.
00:38:11.894 --> 00:38:13.845
So this is, you don't
have to think about it.
00:38:14.025 --> 00:38:19.125
Cloudinary's magic just serves
the best format for you.
00:38:19.485 --> 00:38:22.995
So that's nice because now you
don't have to specify and you don't
00:38:22.995 --> 00:38:26.505
even really have to care too much
about the original image extension.
00:38:26.505 --> 00:38:29.655
You just say, "Hey,
Cloudinary, gimme the best one.
00:38:29.805 --> 00:38:30.325
Whatever.
00:38:30.705 --> 00:38:32.145
We trust you to give us the best one."
00:38:32.910 --> 00:38:36.780
Sam Brace: And then q_auto, to double
down on that real fast, like when
00:38:36.780 --> 00:38:40.560
we were talking earlier about your
original format situation where you're
00:38:40.560 --> 00:38:44.370
converting everything from JPGs
to
WebPs, I think your Internet Explorer
00:38:44.375 --> 00:38:48.120
one is perfect because as we know,
Internet Explorer and WebP don't really
00:38:48.125 --> 00:38:52.260
get along because of WebP was becoming
more of a format as Internet Explorer
00:38:52.260 --> 00:38:55.350
was starting to get phased out, and
Edge was becoming a thing for Microsoft.
00:38:55.650 --> 00:39:00.210
So it does help for those backward
looks as well as those forward looks.
00:39:00.210 --> 00:39:03.210
So I think it was really
smart to make sure that you're
00:39:03.480 --> 00:39:04.500
looking at it from that sense.
00:39:04.500 --> 00:39:09.339
And yes, you're looking at exactly what
I was gonna recommend is, caniuse.com.
00:39:09.360 --> 00:39:12.540
This is always a great way to see the
latest and greatest and what types of
00:39:12.540 --> 00:39:15.420
browsers can serve certain formats.
00:39:15.660 --> 00:39:19.560
And yeah, as you can see here, like
older versions of Chrome, older versions
00:39:19.560 --> 00:39:21.190
of Firefox, they can't handle AVIFs.
00:39:21.210 --> 00:39:23.520
If we pull up WebP would
be almost identical Yeah.
00:39:23.520 --> 00:39:24.690
In some of those cases too.
00:39:24.900 --> 00:39:28.430
So it's nice that you have something
that can constantly format to every
00:39:28.430 --> 00:39:33.330
user's various browser choices, cause
probably there are still some IE users
00:39:33.330 --> 00:39:37.740
out there that are using IE 6, in my
opinion, which is crazy, but it's true.
00:39:38.220 --> 00:39:38.609
Grant Sander: Yeah.
00:39:39.120 --> 00:39:39.359
Yeah.
00:39:39.359 --> 00:39:43.980
And even I think even, AVIF,
as an example, has pretty good
00:39:43.980 --> 00:39:47.069
support, but Edge doesn't support
it, which is interesting to me.
00:39:47.069 --> 00:39:51.439
I would've thought they would, I
believe Edge does support for WebP
00:39:51.439 --> 00:39:54.600
and and it has for quite a while,
actually, since very early on.
00:39:54.600 --> 00:39:57.629
So the nice thing there
is okay, AVIF is great.
00:39:58.080 --> 00:40:00.029
It's probably better than
WebP in a lot of scenarios.
00:40:00.035 --> 00:40:01.140
It's gonna use that most of the time.
00:40:01.140 --> 00:40:03.390
But like Edge users, we
can't forget about them.
00:40:03.390 --> 00:40:06.600
Edge is a good browser, so let's
serve them WebP, which is pretty good.
00:40:06.605 --> 00:40:12.779
And then fallback to something else if
you're for some reason running IE 11.
00:40:13.560 --> 00:40:13.890
Sam Brace: Yeah.
00:40:13.890 --> 00:40:20.220
And if you are, I strongly suggest not, go
ahead after your browser like I said, all
00:40:20.220 --> 00:40:21.670
strokes for all different types of people.
00:40:21.670 --> 00:40:23.040
So it all makes sense.
00:40:23.279 --> 00:40:26.269
So it's already to jump out of
the f_auto, q_auto situation,
00:40:26.269 --> 00:40:28.170
but I love the choices there.
00:40:28.350 --> 00:40:29.549
But what about q_auto?
00:40:29.985 --> 00:40:34.635
Grant Sander: Yeah, so f_auto serves
you the best format, so like image
00:40:34.635 --> 00:40:38.815
format, which is great alone for
bandwidth because a lot of these next gen
00:40:38.835 --> 00:40:41.085
formats have better compression ratios.
00:40:41.085 --> 00:40:43.275
And so you can send smaller
images, which is really good.
00:40:43.635 --> 00:40:48.825
But the q_auto is auto quality, which
allows, basically it allows Cloudinary
00:40:48.825 --> 00:40:51.325
to choose the right compression.
00:40:51.325 --> 00:40:54.645
And so if you take an original
JPG, you can say, all right, let's
00:40:54.645 --> 00:40:58.665
save this as 70% quality so we can
shrink this file size quite a bit.
00:40:58.965 --> 00:41:04.365
So there's always like a balance
between file size and image fidelity.
00:41:04.545 --> 00:41:08.565
That's like the trade-off here is
okay full quality, you have the
00:41:08.565 --> 00:41:12.665
highest level of fidelity, but you
have the largest file possible.
00:41:12.670 --> 00:41:17.325
And so like moving the needle on that
lever a little bit, it's like a balance
00:41:17.325 --> 00:41:19.605
of what's the best thing to serve here.
00:41:19.895 --> 00:41:25.245
So q_auto just allows, again,
Cloudinary is magic to pick
00:41:25.365 --> 00:41:26.805
where to put that needle for you.
00:41:26.805 --> 00:41:27.555
You don't have to do it.
00:41:27.555 --> 00:41:32.904
It's just what's the best ratio
of fidelity to compression
00:41:32.904 --> 00:41:35.295
ratio here and file size.
00:41:35.685 --> 00:41:39.495
And so again, this is like an
easy way just to use the, the
00:41:39.495 --> 00:41:44.115
thing that Cloudinary does really
well is like doing that for you.
00:41:44.444 --> 00:41:49.964
And just not letting not burdening our
content authors with making that choice.
00:41:49.964 --> 00:41:51.254
Like they don't have to worry about it.
00:41:51.254 --> 00:41:53.435
It's just gonna be a good one.
00:41:53.855 --> 00:41:55.245
Fidelity's gonna be good enough.
00:41:55.455 --> 00:42:00.045
It's gonna reduce image bandwidth
as much as you can without making
00:42:00.049 --> 00:42:01.275
images look super distorted.
00:42:01.725 --> 00:42:06.705
So I see f_auto and q_auto as
going hand in a lot of ways of just
00:42:06.705 --> 00:42:12.255
like a good default for not really
thinking a whole lot about image
00:42:12.255 --> 00:42:14.174
stuff, like to, to a large degree.
00:42:14.180 --> 00:42:18.375
You can just forget about the nitty
gritty of the image delivery and format
00:42:18.375 --> 00:42:23.335
and stuff and just be like, yo, I want
a really cool image of this thing.
00:42:23.835 --> 00:42:26.265
And then Cloudinary handles
like serving it well.
00:42:26.745 --> 00:42:29.654
Sam Brace: Oh my gosh, you said it
almost words that I always say when
00:42:29.654 --> 00:42:30.754
I talk to peopleabout f_auto q_auto.
00:42:30.770 --> 00:42:34.560
I always talk about it and in terms of
set it and
forget it, like it's where it's
00:42:35.020 --> 00:42:38.565
just let it do it's magic and handle it.
00:42:38.569 --> 00:42:41.265
Cause you're always going to make
sure that you're getting a 200
00:42:41.295 --> 00:42:42.265
when you're serving something.
00:42:42.465 --> 00:42:44.715
You're always getting it where yeah,
the image is gonna come through.
00:42:44.715 --> 00:42:47.315
You're not gonna be like, As you
were pointing out, like if I tried to
00:42:47.315 --> 00:42:53.165
serve an AVIF today to a Edge user,
I could potentially get a 404 or
00:42:53.165 --> 00:42:57.275
not be able to display content, some
type of something that we don't want.
00:42:57.634 --> 00:43:00.875
This guarantees, deliverability,
it delivers it at the right
00:43:00.875 --> 00:43:04.235
bandwidth, the right compression,
the right format every time.
00:43:04.235 --> 00:43:06.215
So yeah, set it, forget
it the way you put it.
00:43:06.215 --> 00:43:12.915
Just set it and leave it whatever people
want, but it works nicely in that case.
00:43:13.195 --> 00:43:18.705
Jen Brissman: I was gonna say line 31
is why I would venture to say Grant
00:43:18.705 --> 00:43:22.425
tweeted "Cloudinary is boss", because
f_auto q_auto - we'll say it till the
00:43:22.425 --> 00:43:26.990
cows come home, that is Cloudinary's
special sauce, our magic, and I'm glad
00:43:27.015 --> 00:43:31.425
that we all agree and if anyone's just
listening and not watching, they wouldn't
00:43:31.425 --> 00:43:35.355
see the big huge smiles on my face and
Sam's face as Grant was saying all of
00:43:35.355 --> 00:43:39.255
that before, because it's like Sam said,
that's basically like a script that we
00:43:39.255 --> 00:43:42.285
say in training is everything Grant said.
00:43:42.285 --> 00:43:44.345
So he really couldn't have
said it better, Grant.
00:43:44.345 --> 00:43:46.035
Sam Brace: We didn't coach you
ahead of time, grant, so you're
00:43:46.035 --> 00:43:46.245
Jen Brissman: Yeah.
00:43:46.365 --> 00:43:48.595
Seriously no coaching.
00:43:48.975 --> 00:43:51.285
Sam Brace: But, one thing I wanna ask
you about, cause if this is interesting
00:43:51.290 --> 00:43:54.915
to me, so line 32 where you're
declaring the version number here,
00:43:55.245 --> 00:43:56.955
what was your decision making there?
00:43:56.955 --> 00:43:59.625
Because I can see it's a
very specific version number.
00:43:59.805 --> 00:44:00.945
What was your choice there?
00:44:00.945 --> 00:44:03.405
Because that's something that I
haven't seen a lot in people's code
00:44:03.405 --> 00:44:04.335
and it doesn't mean it's wrong.
00:44:04.335 --> 00:44:06.255
I'm just interested in
what you were doing there.
00:44:06.935 --> 00:44:07.325
Grant Sander: Yeah.
00:44:07.455 --> 00:44:10.275
I'm not gonna make a strong
argument that you should do that.
00:44:10.995 --> 00:44:14.775
Honestly I think it was partly
coincidental from grabbing one
00:44:14.775 --> 00:44:15.975
of the images that I uploaded.
00:44:15.975 --> 00:44:18.825
I'm guessing that's where that version
number came from, was like the first
00:44:18.830 --> 00:44:20.825
image I uploaded and grabbed the URL for.
00:44:21.545 --> 00:44:27.195
There's also another reason that I've, I
left that in there was because for regular
00:44:27.195 --> 00:44:32.685
expression reasons, the fact that you can
have folders, like you can have like a
00:44:32.685 --> 00:44:38.895
nested folder structure of your Cloudinary
id, and you can nest things with slashes.
00:44:39.285 --> 00:44:39.915
It can be.
00:44:41.049 --> 00:44:45.779
A little hard to figure out
where your like parameters start,
00:44:45.779 --> 00:44:46.920
like your Cloudinary parameters.
00:44:46.920 --> 00:44:50.670
So like after upload you, you add
in your Cloudinary parameters.
00:44:50.670 --> 00:44:51.120
Sam Brace: Yeah.
00:44:51.540 --> 00:44:55.049
Grant Sander: And then you can add your
version number in there and then put in
00:44:55.049 --> 00:44:56.879
your like folder and path to the image.
00:44:57.160 --> 00:45:03.029
Without a very specific, like v with a
bunch of numbers, it can be hard to figure
00:45:03.029 --> 00:45:07.950
out from a regular expression standpoint
where to inject in the parameters.
00:45:08.020 --> 00:45:13.500
And so like we I set up some automation
to take any Cloudinary URL and check
00:45:13.500 --> 00:45:15.580
to see if it had f_auto and q_auto.
00:45:15.870 --> 00:45:18.420
And if it didn't, it would
automatically inject it in there.
00:45:18.420 --> 00:45:21.330
So if people were like picking a
Cloudinary URL, it would just be
00:45:21.330 --> 00:45:24.000
like we would, we had a GitHub
action script set up and it would
00:45:24.000 --> 00:45:25.259
automatically add 'em in there.
00:45:25.680 --> 00:45:29.609
And it was hard to do some
of the automation without
00:45:29.670 --> 00:45:30.960
the version number there.
00:45:31.350 --> 00:45:38.049
I may have been able to do
it, but, yeah, I like it.
00:45:38.069 --> 00:45:38.669
Sam Brace: It makes sense.
00:45:38.910 --> 00:45:39.540
It makes sense.
00:45:39.689 --> 00:45:41.640
Jen Brissman: That's the first time
that I've ever heard of someone
00:45:41.640 --> 00:45:45.569
using a version number, sort of as
like a pipe or a place to look for.
00:45:45.569 --> 00:45:48.940
So like in your code, did you have
it look for "/v" or something?
00:45:48.964 --> 00:45:51.000
Or, how did you have it?
00:45:51.000 --> 00:45:55.229
Grant Sander: Yeah, so I guess I don't
have the code pulled open right now, but
00:45:55.229 --> 00:46:00.009
if we opened the console, like if you
were to do something like you look for
00:46:00.029 --> 00:46:07.080
something like "v" and then you could
do like digit, multiple digits, and
00:46:07.080 --> 00:46:10.995
then you could test something like this.
00:46:11.145 --> 00:46:12.015
I don't know if you can see it.
00:46:12.015 --> 00:46:12.845
Let me blow that up a little more.
00:46:12.845 --> 00:46:12.985
Jen Brissman: Yeah.
00:46:13.095 --> 00:46:14.365
Sam Brace: Absolutely.
00:46:14.475 --> 00:46:16.185
Grant Sander: That doesn't
pass, but if you have something
00:46:16.185 --> 00:46:19.005
like "v123", it'll pass that.
00:46:19.215 --> 00:46:23.795
So it, it was just a way to do
like regular expression stuff,
00:46:23.795 --> 00:46:25.365
to figure out where things go.
00:46:25.515 --> 00:46:29.145
And there, again, I'm not saying, I'm
not fully sold, that there's no way
00:46:29.145 --> 00:46:30.465
to do this without the version number.
00:46:30.645 --> 00:46:32.715
It was just the path of
least resistance for me.
00:46:32.925 --> 00:46:37.835
A lot of these older images, we didn't
need to do a ton of versioning on them.
00:46:38.295 --> 00:46:43.685
And so at some point, leaving the
version number out is nice because then.
00:46:44.730 --> 00:46:46.830
Cloudinary just uses
the most up to date one.
00:46:47.190 --> 00:46:51.630
And yeah I would've to think more
about I'm not a hundred percent
00:46:51.630 --> 00:46:54.630
convinced I would advise people to
leave the version number in there.
00:46:54.630 --> 00:46:58.180
It's just something I did out
of the migration process and
00:46:58.470 --> 00:46:59.940
making life a little easier.
00:47:00.180 --> 00:47:02.550
Sam Brace: And the way I look at
it, Grant, is this is once again
00:47:02.550 --> 00:47:06.210
showing a real world scenario,
and it worked perfectly for you.
00:47:06.210 --> 00:47:09.390
So it is to say if someone ever had
issues when they're trying to migrate
00:47:09.390 --> 00:47:13.740
things over under using regular
expressions or regex, then this is
00:47:14.070 --> 00:47:16.200
a reasonable outcome in my opinion.
00:47:16.205 --> 00:47:16.845
So this is good.
00:47:19.174 --> 00:47:24.240
So now that I've seen this, so I feel
like we've accomplished two steps now, but
00:47:24.360 --> 00:47:28.500
the third step, and we didn't dive into
it deeply, cause of course I backtracked
00:47:28.500 --> 00:47:29.850
this and let's talk about code.
00:47:30.030 --> 00:47:33.420
But in the same sense, the third
step was testing this migration.
00:47:33.420 --> 00:47:34.259
How did this work?
00:47:34.470 --> 00:47:36.370
So talk to me about the
overall testing process.
00:47:36.950 --> 00:47:40.710
Grant Sander: Yeah, let's, we're
gonna run outta time at some point,
00:47:40.710 --> 00:47:43.950
so we'll go through this one pretty
quick because I think the fourth step
00:47:43.950 --> 00:47:45.360
is maybe a little more interesting.
00:47:45.360 --> 00:47:47.910
But the migration
validation was pretty cool.
00:47:47.910 --> 00:47:50.370
So it was like, I wanted to
make sure I didn't totally
00:47:50.375 --> 00:47:51.930
botch things, which is good.
00:47:51.930 --> 00:47:56.190
It's good to validate, it's like writing
a test for your migration, which is nice.
00:47:56.850 --> 00:48:02.100
And what I did was basically built
our static site, which then dumped the
00:48:02.105 --> 00:48:07.650
entire built site out into a public
folder, is the name of the folder, but
00:48:07.650 --> 00:48:10.920
it's basically just like building your
static site and it's just dumping out
00:48:10.920 --> 00:48:12.810
all the HTML files for your static site.
00:48:13.110 --> 00:48:13.470
Got it.
00:48:13.530 --> 00:48:17.551
So what I did was, again, it did
some globbin' and grabbed all of the
00:48:17.556 --> 00:48:25.620
HTML files out of the built site and
another status map, because this was
00:48:25.625 --> 00:48:26.759
a process that took a little while.
00:48:26.759 --> 00:48:28.410
So saving my progress as I go.
00:48:29.130 --> 00:48:32.790
But what I did was loop through each
HTML file from the build output.
00:48:34.185 --> 00:48:39.205
And I use this thing called, let's
see, Broken Link Checker is the actual
00:48:39.225 --> 00:48:43.545
name of this library, and Broken Link
Checker has, I have it pulled open here.
00:48:43.635 --> 00:48:45.315
It does a handful of things.
00:48:45.315 --> 00:48:51.105
It basically allows you to find broken
links, missing images, et cetera.
00:48:51.105 --> 00:48:53.895
It's whoa, that's what I need to do.
00:48:53.895 --> 00:48:56.145
I need to make sure I don't
have any missing images in here.
00:48:56.355 --> 00:49:01.200
So what I did was, I used this library.
00:49:01.320 --> 00:49:06.450
I just read each HTML file from the
build output, and just configured this
00:49:06.450 --> 00:49:09.520
HTML checker thing to look for images.
00:49:09.770 --> 00:49:15.390
And if an image was missing, it just
pushed it onto an array, I wrote
00:49:15.390 --> 00:49:18.780
that thing out into a JSON file, and
then I could just go look and say,
00:49:18.780 --> 00:49:20.640
"Hey, are there any images missing?"
00:49:21.000 --> 00:49:24.450
And if there were, it would tell
me what the actual source was.
00:49:24.450 --> 00:49:27.570
And so it was really easy for me
to just do a like global find in
00:49:27.570 --> 00:49:31.050
the repository to say, "all right,
here's where we missed the thing.
00:49:31.050 --> 00:49:32.340
Like what happened here?"
00:49:32.790 --> 00:49:36.360
And this was actually pretty nice
because I did miss a couple images
00:49:36.630 --> 00:49:39.840
because in the migration I only
migrated in the markdown files.
00:49:40.215 --> 00:49:43.755
But we had some JavaScript files where
like our React code lived where we
00:49:43.755 --> 00:49:47.625
had like images, like a header image,
or a footer image that was not in
00:49:47.625 --> 00:49:51.165
our content, it was like part of our
actual code, like the JavaScript code.
00:49:51.615 --> 00:49:53.005
And so this was actually nice.
00:49:53.005 --> 00:49:56.025
It actually caught a handful of
pretty important images that were
00:49:56.030 --> 00:49:59.175
like, not content specific, but
more like header and footer images.
00:49:59.865 --> 00:50:01.815
So this was an easy way just
to go in and check to make
00:50:01.815 --> 00:50:04.665
sure, we didn't
miss anything.
00:50:06.105 --> 00:50:06.375
Sam Brace: Yeah.
00:50:06.375 --> 00:50:06.945
And excellent.
00:50:06.950 --> 00:50:10.215
I like the "all good, no
bueno" captures there.
00:50:10.395 --> 00:50:11.510
Fantastic work there too.
00:50:12.810 --> 00:50:13.200
Okay.
00:50:13.200 --> 00:50:16.815
So I understand the testing process and
honestly, once again, this is really
00:50:16.815 --> 00:50:19.910
good playbook material for anybody that's
going through migrations when they're
00:50:19.910 --> 00:50:21.405
going through this overall process.
00:50:21.435 --> 00:50:25.035
But then we're now to the
final step, the big one, right?
00:50:25.065 --> 00:50:30.255
Which is where everything is live and
we're able to start going through and
00:50:30.255 --> 00:50:32.775
seeing results of this overall process.
00:50:32.775 --> 00:50:34.245
So talk to me about that.
00:50:35.055 --> 00:50:39.390
Grant Sander: Yeah, so at this point
we've got all our content migrated, we've
00:50:39.390 --> 00:50:42.089
got our image library up in the cloud.
00:50:42.270 --> 00:50:42.930
We're ready to go.
00:50:42.935 --> 00:50:44.990
We're ready to merge the
thing and ship it live.
00:50:45.460 --> 00:50:49.080
One of the things I did before
that was just do a quick check.
00:50:49.080 --> 00:50:51.120
Like I knew we were gonna
be saving bandwidth.
00:50:51.120 --> 00:50:53.990
Like it's pretty, pretty obvious.
00:50:54.299 --> 00:50:57.900
That's a strong word, but it was somewhat
obvious that, that was gonna be the case.
00:50:57.930 --> 00:50:59.450
I didn't have any doubt.
00:50:59.670 --> 00:51:03.600
I wanted to figure out "okay, how
much actual savings are we gonna get?"
00:51:03.600 --> 00:51:06.279
Cause I did a spot check of a
couple pages and I was just like
00:51:07.640 --> 00:51:08.520
this seems like quite a bit.
00:51:08.520 --> 00:51:10.799
Are we really that image heavy?
00:51:10.805 --> 00:51:12.720
Were we really overserving that much?
00:51:13.140 --> 00:51:14.850
So what I did was wrote a script.
00:51:14.910 --> 00:51:16.650
Let me go find this.
00:51:16.680 --> 00:51:21.480
To basically automate, the way I
checked it was I would open a webpage,
00:51:21.810 --> 00:51:27.450
open my Chrome dev tools, and so let's
go to formidable.com, open my dev
00:51:27.450 --> 00:51:30.000
tools and go to the network panel.
00:51:30.960 --> 00:51:31.650
That's really big.
00:51:31.890 --> 00:51:33.580
Let me refresh this.
00:51:34.370 --> 00:51:37.170
You can select the image tab
and it just shows you all of the
00:51:37.170 --> 00:51:38.700
images that load on this page.
00:51:39.470 --> 00:51:46.170
Pretty standard, dev console stuff, but
it also shows you like how many bytes are
00:51:46.170 --> 00:51:49.470
being sent to this page of just images.
00:51:49.470 --> 00:51:51.660
Cause I had the image filter on,
but you can do the same thing for
00:51:51.660 --> 00:51:53.280
like JavaScript or CSS images.
00:51:53.490 --> 00:51:57.270
So what I did was
just did a quick spot
check on like our homepage, a couple other
00:51:57.270 --> 00:51:59.140
important pages we had up for the time.
00:51:59.990 --> 00:52:05.940
And I just did a little bit of napkin
math and computed, we were having savings
00:52:05.945 --> 00:52:11.730
around 75 to 80%, which I was like, maybe
I should just check a bunch of pages.
00:52:11.730 --> 00:52:14.490
But I don't, I didn't wanna do it manually
and I wanted to be able to tweak some
00:52:14.490 --> 00:52:15.780
things and make sure things were right.
00:52:16.110 --> 00:52:20.700
So what I did was just write a script,
and again, I gotta go find this,
00:52:21.110 --> 00:52:26.400
wrote a little script to basically
automate that exact thing that I
00:52:26.405 --> 00:52:29.220
did using a tool called Puppeteer.
00:52:29.610 --> 00:52:33.420
So Puppeteer, just for those who don't
know, Puppeteer is a pretty cool tool.
00:52:33.420 --> 00:52:34.830
I believe it's out of Google.
00:52:35.180 --> 00:52:35.650
Sam Brace: Yes.
00:52:36.030 --> 00:52:39.720
Grant Sander: And it's a Node
library, which provides high level
00:52:39.750 --> 00:52:43.950
API control to chrome / chromium
over the dev tools protocol.
00:52:44.220 --> 00:52:47.940
So basically what it allows you
to do is create and automate, like
00:52:47.940 --> 00:52:50.160
controlling a Google Chrome instance.
00:52:50.160 --> 00:52:51.030
It's basically what it is.
00:52:51.030 --> 00:52:54.130
So you can spin it up,
point it to webpages.
00:52:54.260 --> 00:52:57.200
It's almost like a little robot
driving your little chrome browser.
00:52:57.490 --> 00:52:59.910
And have a lot of APIs for
doing different things.
00:52:59.910 --> 00:53:03.050
So you can do a lot of pretty
cool stuff with Puppeteer.
00:53:04.845 --> 00:53:06.315
Sam Brace: Yeah, and we
love puppeteer over here.
00:53:06.495 --> 00:53:09.745
It's interesting this, you're not the
first to mention this on even a DevJams
00:53:09.765 --> 00:53:13.965
episode because we had it where people
were taking screenshots of code and
00:53:13.965 --> 00:53:15.705
using that for puppeteer purposes.
00:53:15.915 --> 00:53:20.205
We had a developer that was developing
open graph images for his blog posts and
00:53:20.205 --> 00:53:22.285
doing that with some Puppeteer aspects.
00:53:22.765 --> 00:53:23.575
Fabulous tool.
00:53:23.595 --> 00:53:25.465
Can't recommend it enough
for things like this.
00:53:25.775 --> 00:53:28.385
Once again, good word,
Grant, using awesome tools.
00:53:28.645 --> 00:53:29.745
So good job there.
00:53:30.195 --> 00:53:30.395
Grant Sander: Yeah.
00:53:30.395 --> 00:53:33.300
Another interesting one that
there's better tools in the
00:53:33.300 --> 00:53:37.000
space now, but for a long time,
like generating PDFs was a pain.
00:53:37.580 --> 00:53:40.770
And so I remember like early days of
using Puppeteer, you'd build a webpage
00:53:40.770 --> 00:53:42.870
that was like 8.5 inches by 11 inches.
00:53:43.170 --> 00:53:48.509
Point Puppeteer to it, do a basically
simulating a command P to print
00:53:48.509 --> 00:53:51.540
the thing out and generating
out like a PDF from the page.
00:53:51.840 --> 00:53:54.390
And it was like a really good
way to use like web tooling.
00:53:54.390 --> 00:53:57.750
And it was like you were designing
a PDF using all the web tools that
00:53:57.750 --> 00:54:00.570
you knew, and then you just used
Puppeteer to automate generating those.
00:54:00.760 --> 00:54:05.460
So dynamically generated like receipts or
like inventory lists, things like this.
00:54:05.710 --> 00:54:06.900
You could use Puppeteer.
00:54:06.900 --> 00:54:08.970
So a lot of really cool
use cases with Puppeteer.
00:54:08.970 --> 00:54:09.270
Sam Brace: For sure.
00:54:10.960 --> 00:54:15.189
Grant Sander: So with what we did here
for measuring images, this was tough.
00:54:15.189 --> 00:54:18.720
This was a tougher use of Puppeteer
than what I've done in the past,
00:54:18.725 --> 00:54:23.759
but there's some setup around
getting Puppeteer up and running.
00:54:23.759 --> 00:54:27.060
But basically what we
do is: launch Puppeteer.
00:54:27.630 --> 00:54:30.660
I did headless false, which
shows like the actual view.
00:54:30.750 --> 00:54:33.660
So you can see it like scrolling
through pages and stuff, which is cool.
00:54:34.380 --> 00:54:39.150
I created a single page within the
browser instance and just set like a
00:54:39.450 --> 00:54:44.610
viewport with- the viewport size isn't
really super important on this case- but
00:54:45.240 --> 00:54:50.520
there are some, there's a way for you to
actually create a CDPSession, which gives
00:54:50.520 --> 00:54:53.330
you like access to a dev tools instance.
00:54:53.430 --> 00:54:57.060
So this gives you a way to like
programmatically access chrome
00:54:57.060 --> 00:55:00.990
dev tools from the like robot run,
Puppeteer instance that you have.
00:55:01.460 --> 00:55:01.580
Sam Brace: Okay.
00:55:01.580 --> 00:55:04.740
Grant Sander: And then
you can send signals.
00:55:04.740 --> 00:55:07.650
And this is, I found a lot of
this like from guides on the
00:55:08.000 --> 00:55:08.890
internet, things like that.
00:55:09.230 --> 00:55:14.760
But one of the things you do is you enable
the network functionalities of dev tools
00:55:15.540 --> 00:55:18.240
by sending it this network enable symbol.
00:55:19.235 --> 00:55:21.570
And then there's a lot of code
here and, we're gonna run out of
00:55:21.570 --> 00:55:24.040
time, so I don't wanna go through
all the details of everything.
00:55:25.120 --> 00:55:30.750
But one of the things that basically I did
was you could tap into a couple events.
00:55:30.755 --> 00:55:34.080
And so network response received
was an important one where we
00:55:34.085 --> 00:55:36.930
listened for image responses.
00:55:36.935 --> 00:55:40.440
And so image or binary
octet-stream as the content type.
00:55:41.090 --> 00:55:45.000
And then you store those because
we also have another event.
00:55:45.000
--> 00:55:46.800
There's some like coordinating
that we have to do here.
00:55:46.800 --> 00:55:51.010
I won't go all the way into the details
of this, but when a loading finished,
00:55:51.290 --> 00:55:54.870
you see if it was one of those images
that we caught earlier and we go and
00:55:54.870 --> 00:55:56.850
say, okay what's the image count?
00:55:56.940 --> 00:55:58.200
We'll just keep track of that.
00:55:58.770 --> 00:56:02.940
And then I don't, I'm not convinced
this is the perfect way to do this, but
00:56:02.940 --> 00:56:07.870
a decent indicator of the image size
is the encoded data length property.
00:56:08.220 --> 00:56:11.350
And this matches up pretty well with
what Chrome gives you as well, but.
00:56:12.105 --> 00:56:16.185
My impression is this this might not
be perfect, but it's pretty darn close.
00:56:16.185 --> 00:56:17.865
So it is like good
enough for us to measure.
00:56:18.015 --> 00:56:20.805
It matched up from the pages that
I spot checked, it matched up
00:56:20.805 --> 00:56:22.445
like perfectly with what I saw.
00:56:23.125 --> 00:56:26.205
So for me it was good enough and
it's a consistent measure across
00:56:26.205 --> 00:56:27.315
control and treatment groups.
00:56:27.320 --> 00:56:29.175
So my opinion, it was good enough.
00:56:29.895 --> 00:56:33.195
So then I basically just
had- there's some math here.
00:56:33.195 --> 00:56:37.845
We won't, we don't need to look too
much at the, like dividing some stuff,
00:56:37.845 --> 00:56:43.605
but basically, it is pretty standard
comparison like percentage stuff.
00:56:43.610 --> 00:56:48.405
But I have a control URL, which
is was at the time our production
00:56:48.410 --> 00:56:53.015
site and then a staging URL where
the new Cloudinary version lived.
00:56:53.175 --> 00:56:55.125
And so I have a control
group and a treatment group.
00:56:55.970 --> 00:56:59.865
And for each URL that I wanted to
test, I would point Puppeteer to
00:56:59.865 --> 00:57:02.174
the URL for the production one.
00:57:02.475 --> 00:57:05.265
And then for the staging
one, measure all the stuff.
00:57:05.535 --> 00:57:09.545
I did a scroll, too, to basically
scroll down the entire page to get
00:57:09.545 --> 00:57:11.245
the lazy loaded images to load.
00:57:11.505 --> 00:57:13.799
So that's, pretty common
for images to load lazy.
00:57:15.190 --> 00:57:18.524
Wait for the network to idle so that
you can capture all of the like loading,
00:57:18.524 --> 00:57:21.915
finished events to make sure like all
the images load in, and then just return
00:57:21.915 --> 00:57:25.754
back the like total, which was like
the total number of like encoded bytes.
00:57:25.935 --> 00:57:29.384
And then I wrote all that into
a JSON file, did the percent
00:57:29.384 --> 00:57:30.674
calculations, things like that.
00:57:31.214 --> 00:57:36.055
And the results I know we're, we've
just got a few minutes, but the results
00:57:36.055 --> 00:57:42.075
were pretty, pretty amazing from, just
from like our homepage, for example,
00:57:42.075 --> 00:57:44.444
27 images, percent saving was 48%.
00:57:45.705 --> 00:57:48.944
We had a lot of these
that were like 86 to 90%.
00:57:49.295 --> 00:57:51.415
All of our image heavy pages.
00:57:51.834 --> 00:57:54.194
We have case studies that have
these beautiful graphics and
00:57:54.200 --> 00:57:55.694
these ones we saved a lot.
00:57:55.754 --> 00:57:59.714
A lot of these, the average across
the 30 pages was a about 80.
00:57:59.714 --> 00:58:03.525
It was a little over 86%
bandwidth saving, which was...
00:58:03.585 --> 00:58:03.645
Jen Brissman: wow.
00:58:03.855 --> 00:58:05.174
Grant Sander: Quite a bit
more than I was expecting.
00:58:05.775 --> 00:58:07.004
It was a surprising amount.
00:58:09.004 --> 00:58:09.495
Jen Brissman: Yeah.
00:58:09.500 --> 00:58:09.765
Amazing.
00:58:10.335 --> 00:58:12.464
Sam Brace: One thing that I wanted
to ask you about, because now that
00:58:12.464 --> 00:58:18.285
we've seen the overall process and,
it's great, because as I've said a few
00:58:18.285 --> 00:58:22.245
times now, this is giving people a real
world view of how they could actually
00:58:22.245 --> 00:58:25.134
accomplish a lot of these tasks with
the tools that you've gone and shown.
00:58:25.134 --> 00:58:28.634
Of course, they may not have your
expertise, and so they needed some
00:58:28.634 --> 00:58:32.115
help to be able to go down this
path, but you've given it to them.
00:58:32.355 --> 00:58:36.165
But to wrap this all up, so as we
have talked about the very beginning
00:58:36.165 --> 00:58:40.185
of this conversation, Formidable is
doing a lot of development and design
00:58:40.185 --> 00:58:43.305
work for clients for large companies.
00:58:43.305 --> 00:58:46.845
You also said small startups, but people
that need design and development help.
00:58:47.565 --> 00:58:49.935
With the learnings that you took
through this project to help out the
00:58:49.940 --> 00:58:54.315
Formidable site, how are you now applying
some of that to your client base?
00:58:55.125 --> 00:58:58.275
Grant Sander: Yeah, I think one
of the big things is we're very
00:58:58.875 --> 00:59:02.685
eager to recommend services like
Cloudinary early, like upfront in the
00:59:02.685 --> 00:59:07.109
development process, so that you can
just avoid having to migrate at all.
00:59:07.109 --> 00:59:09.990
Because migration comes at a cost,
like you have to do the work.
00:59:09.990 --> 00:59:15.029
And so one of the things is just here's
an example of how much you can save
00:59:15.029 --> 00:59:16.799
by using a service like Cloudinary.
00:59:16.980 --> 00:59:18.000
Just use it upfront.
00:59:18.000 --> 00:59:21.390
If you know that you're gonna have a
lot of images, user-generated images,
00:59:21.390 --> 00:59:27.060
a lot of content, visual heavy content,
just start with Cloudinary upfront.
00:59:27.379 --> 00:59:32.029
So I think that's our recommendation
to our clients now, is like
00:59:32.029 --> 00:59:33.180
you said,
best of breed.
00:59:33.185 --> 00:59:36.240
Choose the thing that's gonna
get the job done the best and
00:59:36.240 --> 00:59:37.680
this is a good showcase of that.
00:59:38.700 --> 00:59:42.140
Sam Brace: And I would also even say, I
appreciate you recommending Cloudinary,
00:59:42.140 --> 00:59:47.580
but it's also, I think even in strong
message, that's not as about us, is just
00:59:47.730 --> 00:59:50.430
you really do need to think about your
images and videos and how they're gonna
00:59:50.430 --> 00:59:51.960
be displayed, how they're gonna load.
00:59:52.170 --> 00:59:55.980
It's a very important part to how
users experience these websites.
00:59:56.190 --> 00:59:59.490
So I think the fact that you're addressing
Cloudinary at the beginning is also
00:59:59.490 --> 01:00:02.730
stating to them, you need to have a
strategy when it comes to how you want
01:00:02.730 --> 01:00:06.870
your images and videos to be loading and
how you want the user to receive those
01:00:06.870 --> 01:00:09.030
and be actionable with that information.
01:00:09.030 --> 01:00:12.030
So I love the fact that you're
making your clients think about
01:00:12.030 --> 01:00:13.470
media more, which is great.
01:00:14.970 --> 01:00:15.810
Grant Sander: Yeah, absolutely.
01:00:17.370 --> 01:00:18.680
Sam Brace: Jen, final thoughts here.
01:00:18.680 --> 01:00:20.970
What do you think, is there
anything that's burning in your
01:00:20.970 --> 01:00:23.259
brain here about what me and Grant
and you have covered here today?
01:00:24.145 --> 01:00:27.795
Jen Brissman: Yeah, the biggest thing is
we've talked a lot about images today.
01:00:27.915 --> 01:00:33.315
And especially with client work, my
brain was already going to "okay.
01:00:33.315 --> 01:00:34.595
What about other types of media?"
01:00:35.335 --> 01:00:40.090
"Is Grant, are any of his clients
asking about 3D or audio or video?"
01:00:40.090 --> 01:00:43.095
We've really focused on images
today, but Grant, do you think
01:00:43.095 --> 01:00:44.595
this would apply to everything?
01:00:45.835 --> 01:00:50.235
Grant Sander: Yeah, I think video
is at least as complex as image is
01:00:50.235 --> 01:00:54.015
and we have, for example, our Puma
team has been doing some exploration
01:00:54.015 --> 01:00:58.395
with using Cloudinary's programmatic
video generation and delivery.
01:00:58.400 --> 01:01:02.605
And so we've been doing some exploration
on the video front where we have, either
01:01:02.605 --> 01:01:08.175
like content author driven videos or
even user generated videos, and figuring
01:01:08.175 --> 01:01:11.745
out how to like programmatically
handle those in a efficient way.
01:01:11.745 --> 01:01:13.215
So we have been looking.
01:01:13.485 --> 01:01:15.675
We haven't done a ton in the 3D
space, but video is definitely
01:01:15.675 --> 01:01:19.215
something that's on our radar and
especially with like video becoming
01:01:19.375 --> 01:01:22.255
a pretty popular medium right now.
01:01:22.495 --> 01:01:25.815
A lot of places are moving into
the video space and allowing
01:01:25.815 --> 01:01:29.025
for user generated video stuff
and so definitely on our radar.
01:01:29.985 --> 01:01:30.585
Jen Brissman: Absolutely.
01:01:30.585 --> 01:01:30.735
Yeah.
01:01:30.735 --> 01:01:34.424
Video and mobile and everything like that.
01:01:34.424 --> 01:01:39.585
And I actually find that Cloudinary
is incredibly powerful when
01:01:39.585 --> 01:01:42.045
it comes to q_auto with video.
01:01:42.115 --> 01:01:45.464
The results are pretty mind
boggling in my opinion.
01:01:47.675 --> 01:01:48.615
Sam Brace: Exciting.
01:01:48.945 --> 01:01:50.145
Thank you so much for being here.
01:01:50.145 --> 01:01:51.255
This was fantastic.
01:01:51.255 --> 01:01:55.424
We appreciate all of your time, we
appreciate your insights and obviously
01:01:55.515 --> 01:01:58.005
you're doing some great work over
at Formidable, as well as the entire
01:01:58.005 --> 01:01:59.835
Formidable team, so keep it up.
01:01:59.835 --> 01:02:00.915
This is fantastic work.
01:02:01.634 --> 01:02:02.595
Grant Sander: Yeah, thanks for having me.
01:02:03.165 --> 01:02:03.884
It was a blast.
01:02:04.515 --> 01:02:04.755
Sam Brace: Excellent.
01:02:05.759 --> 01:02:10.200
And so of course, Jen, as we have pointed
out right at the very beginning, but
01:02:10.200 --> 01:02:14.040
it's worth stating again for everybody
here, that all of these episodes, if
01:02:14.040 --> 01:02:16.859
you've enjoyed this one or wanna see
what else we've talked about, because
01:02:16.859 --> 01:02:19.500
we've mentioned with some of these
technologies that Grant covered, we've
01:02:19.500 --> 01:02:21.180
covered them in other episodes as well.
01:02:21.390 --> 01:02:26.279
You can always visit all of those at
cloudinary.com/podcasts and dive into
01:02:26.279 --> 01:02:31.189
all of the various episodes of podcasts
that Cloudinary produces on that site.
01:02:31.849 --> 01:02:36.044
And of course, if you have other things
that you wanna discuss around what
01:02:36.044 --> 01:02:39.404
Grant has covered here, the best place
to do that is the Cloudinary Community.
01:02:39.410 --> 01:02:41.755
That's gonna be at
community.cloudinary.com.
01:02:41.924 --> 01:02:45.674
And you can see that we have forums
for people that wanna have more of a
01:02:45.674 --> 01:02:49.424
threaded conversation, and ways to keep
track of things a little bit easier.
01:02:49.424 --> 01:02:54.254
But also we do have a Discord server
for those that are Discord users, and
01:02:54.254 --> 01:02:58.035
to have that as a real-time chat option
as well for the overall community.
01:02:58.484 --> 01:03:01.544
So absolutely make sure that you guys
are diving into all of that content.
01:03:01.785 --> 01:03:05.625
And as mentioned before, everything
that we covered in this episode is
01:03:05.625 --> 01:03:09.805
also covered in depth in Grants blog
post, which is found on formidable.com,
01:03:09.825 --> 01:03:14.355
which we do recommend that you read
for more deep details of everything
01:03:14.355 --> 01:03:15.694
that was in this overall episode.
01:03:16.494 --> 01:03:21.629
So Jen, before we let everybody go, any
final thoughts before we say goodbye to
01:03:21.629 --> 01:03:23.810
our friends and family here at DevJams?
01:03:25.100 --> 01:03:27.180
Jen Brissman: Well, lots of
thoughts, and that was a really
01:03:27.180 --> 01:03:28.410
interesting episode for sure.
01:03:28.410 --> 01:03:32.100
But one of the main takeaways for me is
how creative you can be with the givens.
01:03:32.105 --> 01:03:35.850
So for instance, just something like
version number, it's not something,
01:03:36.339 --> 01:03:40.140
all of our customers use or that
would apply to every use case.
01:03:40.140 --> 01:03:43.830
And Grant was using it in a unique
way and it just really goes to show
01:03:43.830 --> 01:03:48.390
you can be creative with what you're
given and yeah I wonder if anyone
01:03:48.810 --> 01:03:51.779
watching might do something like that
now after, after seeing what Grant did.
01:03:52.410 --> 01:03:53.580
Sam Brace: I agree, I agree.
01:03:53.609 --> 01:03:54.029
Absolutely.
01:03:54.029 --> 01:03:55.230
And amazing takeaway, Jen.
01:03:55.709 --> 01:03:59.160
So on behalf of everybody at Cloudinary
and of course those that were
01:03:59.160 --> 01:04:01.980
involved with the overall program
in this development, thank you for
01:04:01.980 --> 01:04:06.450
being part of this DevJams episode,
and we are excited to see you at
01:04:06.509 --> 01:04:08.459
the future ones that we do produce.
01:04:08.669 --> 01:04:10.379
Take care and we'll see you soon.