AI wrote code, but forgot about performance - fix it with 1 prompt | Angel Pichardo, ImageKit.io — Transcript
Full transcript
- 0:09Uh hey guys, I'm Angel. I'm from
- 0:10ImageKit.
- 0:11Uh so, for just a raise of hands, uh who
- 0:14uses MCPs in their in their in their
- 0:16daily development?
- 0:18Fantastic. Uh
- 0:20I'm just going to encourage more of you
- 0:21to do so uh
- 0:23before you actually finish development.
- 0:25So, here I have a website that I made uh
- 0:28using uh cursor and uh
- 0:33as I put all my images in there and I go
- 0:35ahead and I refresh.
- 0:37I notice
- 0:40that these images take a long time to
- 0:41load.
- 0:42And I'm uh
- 0:45so,
- 0:46one of the things I want to show you
- 0:46guys is how you use ImageKit's new MCP
- 0:48to actually fix your images and video
- 0:50performance at within your React
- 0:52websites.
- 0:53And so, uh
- 0:55one of the places you can go to here is
- 0:57actually our uh
- 0:59actually do it do it do it locally or
- 1:01through our API.
- 1:04And also use uh
- 1:05this thing called Chrome developer tools
- 1:07that they also developed a new MCP
- 1:08recently. Uh
- 1:11that we can go ahead and try out.
- 1:13And so, the first prompt I'm going to be
- 1:14using is uh to use the Chrome developer
- 1:17developer tools MCP to record a
- 1:20record a performance trace
- 1:23of my website and tell me the three
- 1:24biggest performance issues of that
- 1:26website.
- 1:28And then we're going to identify the
- 1:30issues and tell me what
- 1:31which specific URL images are causing
- 1:34the issues.
- 1:35And then we're going to generate helpers
- 1:37to fix the problem.
- 1:39And then we're going to update our
- 1:39performance. And then we're going to
- 1:41verify [snorts] to make sure everything
- 1:42was done correctly. I'm going to just
- 1:44run through one of these uh just due to
- 1:46the time.
- 1:47And uh we'll just take a look quick look
- 1:50at what the uh
- 1:52image uh what the website looks like
- 1:53right now. You can see see the images
- 1:56are loading very slowly.
- 1:59And then when we run all our fixes,
- 2:02everything will be much more smooth
- 2:06as we learn.
- 2:09And so let
- 2:11uh
- 2:12So,
- 2:13m- when we're doing this manually, we'd
- 2:15have to go over to the docs. We have to
- 2:18check out, okay, like uh I need to think
- 2:20about uh how to actually do lazy
- 2:23loading, how to resize my images, how
- 2:26what kind of quality do I want to have,
- 2:28what what what's the format I want to
- 2:29have it in. Uh there's a lot of things
- 2:31that go into making sure your images and
- 2:33videos are actually optimized the best
- 2:34way possible. Uh that's what Normally,
- 2:37you go into ImageKit's docs and figure
- 2:38out how to do it. But, uh with the power
- 2:41of MZP's and your favorite cursor IDE,
- 2:44you don't have to do that anymore.
- 2:46So,
- 2:48I'm going to run one prompt just to show
- 2:49you guys how it would how it would done.
- 2:53I I got it started
- 2:54earlier, so we're just going to run the
- 2:55tool
- 2:57just so you can see what's happening
- 2:58right now.
- 3:08So, for context, this is running the the
- 3:09first prompt and
- 3:12figuring out what actually is wrong with
- 3:14the the broken React
- 3:18e-commerce site.
- 3:22Let me just run through.
- 3:24It opens up the site on its own.
- 3:27It's going to go through and identify
- 3:28all the problems.
- 3:32And so, what we're going to do is hop
- 3:34over to
- 3:36the presentation.
- 3:39I'm going to highlight a few things.
- 3:43So, typically, as I mentioned,
- 3:44performance is an afterthought.
- 3:46Uh we we we we build our our website and
- 3:49our and we have our images on the on the
- 3:51page and it's working perfectly. Uh
- 3:53us or so we thought, and then we finally
- 3:55refresh our page, and now we're like,
- 3:56"Oh, what's going on?"
- 3:59So, we want to fix performance, but we
- 4:00don't want to do it manually anymore. We
- 4:01want to use our AI to do it for us, so
- 4:03we don't have to.
- 4:05And so, uh exactly what are these MCPs
- 4:07doing? Uh so, we have to answer two
- 4:09questions: What's broken? How do I fix
- 4:11it?
- 4:14Uh the Chrome developer tools has a uh
- 4:16the the Chrome dev the dev tools MCP has
- 4:19a few tools we're going to use. It's
- 4:21going to navigate the page. Uh we're
- 4:23we're going to do a trace. We're going
- 4:24to do a performance analyze. Uh and
- 4:27we're going to take a snapshot, as well
- 4:28as list the network requests to to make
- 4:31sure that we understand exactly what's
- 4:32happening through our website.
- 4:34And then we're going to use ImageKit to
- 4:35actually search the docs uh using the
- 4:37agents, and we'll execute all the
- 4:39changes.
- 4:42Uh ImageKit uses uh a one URL to fix all
- 4:45the all the
- 4:46all the uh optimization issues. So, uh
- 4:49our first URL uh is going to be just a
- 4:51basic URL that has all the
- 4:54um the the default image. And then with
- 4:58our URL, we're going to change it so
- 4:59that uh we change the width to to it to
- 5:03actually 1,200 pixels. We have the
- 5:05quality at 80%, and uh our our focus is
- 5:08going to be auto.
- 5:10And that will change our image to go
- 5:12from to 3.28 MB to only
- 5:1847.5 KB.
- 5:22And overall, that'll bring our website
- 5:23down from 68 MB all the way to 1.4 1.84
- 5:27MB.
- 5:31So, my overall
- 5:33um
- 5:35ur- urge urgency to you guys is to not
- 5:37wait till after post development. Uh use
- 5:39MCPs uh during your development, and uh
- 5:43to and and please check out ImageKit for
- 5:45all your image and video performance
- 5:47needs.
- 5:49Thank you so much.
- 5:53>> [applause]
- 5:57[music]
About this transcript
This page contains the full transcript of AI wrote code, but forgot about performance - fix it with 1 prompt | Angel Pichardo, ImageKit.io by React Conferences by GitNation, generated from the public captions YouTube serves with the video. The transcript has 934 words across 157 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.