Use object-fit to crop and fit images into any defined size - Micro lesson #25

Поделиться
HTML-код
  • Опубликовано: 30 авг 2021
  • No more individually sizing images in Adobe Photoshop, Figma or Microsoft Paint. With the power of object-fit, you can fit your images into any defined width or height on your canvas. To accomplish this, follow these two steps:
    1. Set a defined width and height on your image
    2. Select any of the object-fit property (fill, cover, contain, none, scale down)
    Now you can temporarily exit out of your image editing program, because you can size and position your images directly in Webflow.
    Learn more about sizing elements in our 101 crash course → university.webflow.com/course...
    ----------
    Get started with Webflow: wfl.io/2r7cVUW
    Join the Webflow Community: webflow.com/community
    webflow.com
    / webflow
    / webflow

Комментарии • 38

  • @apache95
    @apache95 2 года назад +12

    50 Shades of Grímur. Beautiful.

  • @rodrigo.lamadrid
    @rodrigo.lamadrid 2 года назад +2

    You're a darling, Grimur! This was soooo useful 🤩 keep the quality content and tutorials coming!

  • @brandonwolff966
    @brandonwolff966 2 года назад +30

    Be careful of how much extra image you aren’t showing throughout your site for load time. That part of the image still needs to load even though it isn’t being shown.

    • @pixelgeek
      @pixelgeek 2 года назад +8

      This is a great point for us developers. But there are times when a client will upload a too small or too big image and this trick really helps crop things perfectly for them.

  • @georgeuxuidesign
    @georgeuxuidesign 7 месяцев назад

    Damn, this tool and these teachers never stop surprising me

  • @PepperstreetDev
    @PepperstreetDev 2 года назад

    Thank you !!!

  • @asjap2533
    @asjap2533 2 года назад

    thank you!!

  • @reinoldg
    @reinoldg 2 года назад +9

    Making images fit or resizing them on the fly plus applying relative and absolute properties is always a struggle for me. Maybe you could make a tutorial with a dozen of examples on how to crop, resize, transform, overlap and fit images. That would be great for beginners

    • @Webflow
      @Webflow  2 года назад +2

      Hi @Reinold Guzman, thanks for the suggestion! We'll see what we can do.

    • @Webflow
      @Webflow  2 года назад +1

      In the meantime, you may find this video lesson helpful: ruclips.net/video/GPadt8wmGXM/видео.html

    • @reinoldg
      @reinoldg 2 года назад

      @@Webflow thank you

  • @farisfaisyal6493
    @farisfaisyal6493 11 месяцев назад

    Thankss

  • @deadshotgaming6449
    @deadshotgaming6449 2 года назад

    Thanks

  • @shubhamparekh9808
    @shubhamparekh9808 2 года назад

    Great 👍

  • @xbrsh
    @xbrsh Год назад

    thank you for helping.

  • @thejaysehansen
    @thejaysehansen 2 года назад +1

    Great vid. Can 'cover' also work with embedded videos somehow?

  • @billdodson5703
    @billdodson5703 2 года назад +2

    pure beauty

  • @1WillyDAVID
    @1WillyDAVID 2 года назад

    thanks grimmur!

  • @Jatrki
    @Jatrki 2 года назад +2

    Wow!

  • @alexxlem
    @alexxlem 2 года назад +2

    I've used the object-fit feature in Webflow and I noticed when I use an image that has by default a landscape aspect ratio (e.g. 6:4), it looks super sharp in an horizontal aspect ratio container, but when I change the aspect ratio of the container, for instance for mobile, to a vertical portrait ratio (e.g. 4:6), the image become slightly blurry. Yes, I’m using an image that is at least 2x (width and height) of the container size, so it’s supposed to be sharp on retina displays. My workaround is to crop the same image in Figma to a 4:6 ratio and re-export it, it now looks super sharp on mobile. Any idea why?

    • @christossoulakis2539
      @christossoulakis2539 2 года назад +1

      Webflow compresses big images if I'm not mistaken. It's usually better to upload an image with the correct size

    •  2 года назад

      @@christossoulakis2539 Not an expert, but I would guess it's probably something to do with the image optimization and which one Webflow is choosing to display, based on the horizontal size?

    • @Webflow
      @Webflow  2 года назад +3

      Hi Alex, great question! It sounds like your images may be getting resized with our responsive image workflow: university.webflow.com/lesson/responsive-images
      Within this guide you'll learn how to disable responsive images which should prevent the resizing issue which you're running into.
      If you have any questions, please let us know on the Webflow Forum: forum.webflow.com/
      We're here to help!

    • @alexxlem
      @alexxlem 2 года назад +2

      @@Webflow Oh wow - I just did a test and yes, that was exactly the problem. I disabled the responsive image and it now the same image looks super sharp on desktop and mobile! Thanks!

  • @Wizastudios
    @Wizastudios 2 года назад

    Did you fix the publish rotation problem yet?

  • @DishanTD
    @DishanTD 2 года назад +1

    👌👌👌

  • @nikitamanchenko7507
    @nikitamanchenko7507 2 года назад

    Is working only for Images, not for DIV or ?

    • @Webflow
      @Webflow  2 года назад

      Yes. This only works for inline images.

  • @ChineduChidiebere
    @ChineduChidiebere 6 месяцев назад

    Hello team webflow ,
    when I change designs on smaller devices, it affects both the larger screens. I don't know if this is a technical issue or i'm missing something. I need help please

  • @mr.fanstastic9010
    @mr.fanstastic9010 3 месяца назад

    What about rotation and flip?

  • @RogrM6
    @RogrM6 2 года назад +1

    🙌🙌🙌🙌🙌

  • @harrymolyneux
    @harrymolyneux 2 года назад +2

    ASMR video of this guy saying "swishsed" pls

  • @georgemath2878
    @georgemath2878 2 года назад

    I love you Grimur...haha

  • @HOLBAG
    @HOLBAG 2 года назад

    Please, I have a question
    ïam busy to build website local
    on main menu are price button page
    on this page there are two buttons one for men price and another for ladies price
    when click on men button I only see the price of man .
    when click on ladies button I see only the price of ladies
    this happend in the same page not go to another page.
    Thanks

    • @Webflow
      @Webflow  2 года назад

      Hi Leo! Thank you so much for asking about your site build styles.
      Can you please create a post on the Webflow Forum with your site details so that we and the community can help with this design related question?
      forum.webflow.com/
      Thanks in advance!

  • @flyingbrokenarrow
    @flyingbrokenarrow 2 года назад +1

    Hey Grímur, please say squished again. Please...

  • @jo69123
    @jo69123 6 месяцев назад

    I'd be a lot more helpful if you could break down how real pro designers place images and set real world responsive width tricks so that any image works at any given viewport width
    This is not a real world use case