Ultimate Guide to Hero Images [Best Practices + Examples]

ultimate-guide-to-hero-images-[best-practices-+-examples]

Whether or not you realize it, you judge every website by its visual appeal. And it only takes about 0.05 seconds to form an opinion. That means the hero image (the first photo, graphic, or video people see) has to be eye-catching enough to keep people scrolling the site.

High-quality hero images are the key to a great first impression. If done well, they represent the essence of your brand identity and the overall theme of your web page.

Yes, it’s a lot of weight for one piece of visual content. That’s why it’s the most heroic of all.

This guide will explain how to level up your website with the perfect hero image, from choosing a graphic inspired by the latest design trends to ensuring your image is the optimal size. We’ll also walk through hero image examples to spark ideas for your own website. Get ready for some design eye candy.

Hero Image In Web Design

If engaging visuals are the sprinkles on top of every great design system, a hero image is the shiny, red cherry. It draws your eye in and makes you want more.

In web design, a hero image is the first photo, graphic, illustration, or video people see on a web page. It typically incorporates both an image and text in order to convey a company’s core message. Hero images sit above the fold and often feature a call to action (CTA) that encourages people to dive deeper into the website. The goal of this image is to add energy and excitement to a page. You want it to show off your brand’s style, share the purpose of your site, and make people excited to explore.

A good hero image can elevate your traffic and conversions by making people want to interact with your site. Animation, carousels, and scroll-triggered effects are ways to flex your creativity beyond typical stock photography. But a bad image can bring down an otherwise great design. Off-brand visuals, large files that slow loading speed, and meaningless copy can ruin the user experience.

One common mistake when designing a hero image is getting the right file size. Too large, your loading speed plummets. Too small, everything looks pixelated. Let’s walk through the different hero image sizes so you can create a stunning image every time.

Hero Image Dimensions

Finding the right aspect ratio and cropping can get confusing when sizing a hero image. Banner hero images aren’t the same as full-screen images, and every image has to scale to fit the space. You also have to consider that no one browses in exactly the same way. Personally, my screen is usually zoomed in to 120%, but others may have dozens of tabs open that are all different sizes.

Some image cropping is bound to occur as your hero image scales to fit a variety of screens, so it’s best to think of the following dimensions as guidelines, not rigid rules.

1. Full-Screen and Banner Image Dimensions

The ideal size for a full-screen hero image is 1,200 pixels wide with a 16:9 aspect ratio. For a banner hero image, the ideal size is 1600 x 500 pixels.

If you need crystal-clear images, or your target audience browses on large screens, you may have to size up to 1,800 pixels. Keep in mind this can result in a large file size that slows down your site.

You can check your loading speed for desktop and mobile with Google’s PageSpeed Insights. It gives a comprehensive look at which site content loads first and where there’s room for improvement. Aim for a page load time of one to two seconds because you’ll likely lose people if it’s over five seconds.

2. Mobile Hero Image Dimensions

The ideal size for a mobile hero image is 800 x 1,200 pixels.

While it’s important to consider how your hero image looks on a desktop, you can’t ignore the mobile experience. Nearly 55% of global website traffic in 2021 is generated on a mobile phone.

Your hero image design must be responsive and fit a vertical (phone) and horizontal (tablet) orientation. Dynamic hero images, like videos, do well on a desktop, but they often have to be swapped out for a static image for mobile. Videos take more time to load, and no one wants to take a massive hit to their data plan just to see your site.

3. Hero Image Compression

You want to compress your hero image if you have a large file size (anything over 1MB is too big). You can use sites like TinyJPG, Compress JPG, or Adobe’s Photoshop Compressor to decrease the size without reducing quality. Just make sure to get the dimensions right beforehand or the image may appear blurred or stretched.

When sizing a hero image, check your Google analytics to see the typical screen resolution of your website visitors. Then, design with that target audience in mind. Just remember to test out your hero image on multiple browsers, screens, and phones to see how it scales. Once you have the dimensions right, it’s time to work it into your web page using HTML and CSS.

Hero Image HTML

HTML is a coding language made up of elements used to give structure to a web page. It creates order and lets you embed content (like hero images) into a site.

Creating a hero image with HTML ensures your visual appears on a web page, while CSS makes it look good on a screen. Both require coding skills, so you may need to brush up on your HTML and CSS knowledge or enlist the help of a developer.

The main things to keep in mind are:

  • The hero image needs to be centered.
  • The text needs to be easy to read.
  • It has to look great on all screen sizes.
  • The image should cover the entire viewport.

Follow these steps to set up an eye-catching hero image. Note: The examples below include HTML elements and CSS rules, but I’ll explain the difference between the two later on.

1. Create the structure.

Set up two containers for your hero image using the coding conventions of your website. For instance, the first example below uses .hero for the structure and .hero-content for the image, text, and button, while the second uses .image-container and .inner-container.

how to create an HTML structure for hero imagesImage source

hero-image-html-structureImage source

2. Add your content.

Once the structure is in place, it’s time to personalize your image. Add an image, choose a custom font, craft a header and subheader, and create a button with an enticing CTA. If you want to add a filter to your background image (without applying it to the text), DeveloperDrive recommends including the filter before your .hero-content code.

how to personalize your hero image with HTML

Image source

Notice how the width and height under the .hero section are set to 100vw and 100vh. This ensures the image fits the entire viewport, both vertically and horizontally, so it spans the whole screen.

No hero image is complete without a button that drives people to take action. Incorporate one into your image with the

Read The Full Article
This Content Was Originally Posted At:
https://blog.hubspot.com/marketing/hero-image

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Do You Have The Internet Business Quick Start Guide?
Enter your details below, and I will send you this short guide that shares:

The Simple Steps To
Start Your Online Business Today!

We respect your privacy.