Fireship · @fireship

Firebase Extensions Quickstart

Uploaded September 26, 2019 · Length 6:42

Firebase Extensions Quickstart

Summary

firebase extensions quickstart tutorial: how to use firebase extensions to add features like image resizing, translation, and distributed counters to your app without writing code.

  • firebase extensions
  • firebase quickstart
  • image resizing
  • translation api
  • distributed counters
  • firebase functions
  • cloud storage
  • firestore

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    today at firebase summit a big new

  2. 0:01

    feature was announced firebase

  3. 0:03

    extensions imagine if the cloud had

  4. 0:05

    something like a wordpress plug-in

  5. 0:06

    system where you can install or opt in

  6. 0:08

    to specific features based on the needs

  7. 0:10

    of your application and with this

  8. 0:12

    initial release we have nine plugins

  9. 0:13

    that handle things like image resizing

  10. 0:15

    distributed counters transactional email

  11. 0:17

    and more and once again firebase has

  12. 0:20

    made a bunch of my past videos obsolete

  13. 0:22

    I'm not too english Masshole career so

  14. 0:24

    today i want to show you how to not

  15. 0:26

    write code by using firebase extensions

  16. 0:28

    if you're new here like and subscribe

  17. 0:30

    and consider becoming a pro member at

  18. 0:31

    bioship i/o and if you're serious about

  19. 0:33

    building apps on the firebase platform

  20. 0:35

    to get started you'll need to have a

  21. 0:36

    firebase project and if you go down here

  22. 0:38

    to the bottom you'll see a new option

  23. 0:40

    for extensions let's go ahead and

  24. 0:42

    install the first one we see to resize

  25. 0:44

    images now unfortunately for me about a

  26. 0:46

    year ago I created a video about

  27. 0:48

    resizing images with a cloud function

  28. 0:50

    but this extension provides the exact

  29. 0:52

    same functionality with no effort on my

  30. 0:54

    part and it's tested and maintained by

  31. 0:56

    these smart people at Google let's go

  32. 0:58

    ahead and click install and you'll see

  33. 1:00

    it takes us to a page to configure the

  34. 1:01

    extension the first thing it'll have you

  35. 1:03

    do is review the architecture or API is

  36. 1:06

    enabled by this extension when it comes

  37. 1:08

    to image resizing you'll need to have a

  38. 1:09

    cloud storage bucket and then a cloud

  39. 1:11

    function to handle the resizing after a

  40. 1:14

    file is uploaded to that bucket go ahead

  41. 1:16

    and click Next and then it will have you

  42. 1:18

    review the access granted to the

  43. 1:19

    extension firebase will automatically

  44. 1:21

    create the appropriate service account

  45. 1:23

    that has IM roles assigned for whatever

  46. 1:25

    resources this extension needs in the

  47. 1:28

    third step is where we configure and

  48. 1:29

    customize the behavior of the extension

  49. 1:31

    in this case we'll go ahead and have it

  50. 1:33

    generate thumbnails for 200 500 and 1000

  51. 1:37

    pixel sizes and we'll go ahead and

  52. 1:39

    specify a directory in the bucket named

  53. 1:41

    thumbs which is where the thumbnails

  54. 1:42

    will be saved it will take a few minutes

  55. 1:44

    to install because what it's doing under

  56. 1:46

    the hood is deploying a cloud function

  57. 1:48

    to your project after it's complete

  58. 1:50

    you'll be able to review the

  59. 1:51

    configuration details and then if you go

  60. 1:53

    to the functions tab you'll see that

  61. 1:54

    cloud function deployed in your

  62. 1:56

    functions list and if you're really

  63. 1:58

    interested in how the function works

  64. 1:59

    under the hood you can go to the GCP