Drupal: Add a Hero Photo at the Top of a Web Page

What is a Hero Photo?

  • Hero photos are optional, large full-width header photos at the top of a web page.

  • The official Fredonia Photo Library is at www.fredonia.edu/photos. Help with the Photo Library is at www.fredonia.edu/photos/help

  • A Hero Photo must be at least 1600 pixels wide by 900 pixels tall and it must follow the composition rules described in the section below, "How to compose a good Hero Photo".

  • The hero photo must not include any text because:

    • text in an image is not accessible,

    • text in a hero photo will be cropped differently for each viewers’ different devices and screen sizes, which obscure parts of the text.

    • See Web Standards: https://www.fredonia.edu/web-standards

How to compose a good Hero Photo

Hero photos must be carefully composed and cropped to work well on both desktop and mobile devices.

  • A Hero Photo must be at least 1600 pixels wide by 900 pixels tall. To ensure flexibility in cropping, we recommend that the source photo be 2000-2500 pixels wide. 

  • The middle of the upper 2/3rds of a hero photo must contain the relevant action and be the focus of the photo subject.

  • Anything outside of that middle-upper 2/3rds will be cut off when the web page is displayed on smaller screens. See examples, below.

If you follow these rules for composition, the hero photo will look good on narrow mobile devices and on wide desktop screens:

     

Steps to add a Hero Photo to your page

  1. Edit the page and click on the Hero Photo section, above the Title.

  2. Click Open File Browser link to see a list of your images on the website or to add a new image.

  3. The File Browser pop-up window appears.



  4. Navigate to your website. Look at the breadcrumb at the top of your page to determine the path to your website files.
    All file paths begin with "section" then follow the steps shown in the page breadcrumb
    In this example below, the file path will be section > about > offices > marketing-and-communication > training which you will use in the next step.




  5. A page should appear that looks like this: https://www.fredonia.edu/admin/workbench/file-browser. Navigate to the same file path as your page breadcrumbs (above).

  6. You may choose an existing image on the server, or to upload a new image.

    1. To select an existing image, click on it in the files list, then click Select.

    2. To upload an image file from your computer:

      1. In the File Browser window, click Upload, then click Add.


      2. Browse your computer for an image, click Open, then click Select.

  7. Complete the Alternative text field, then click on the image once to apply the cropping.
    The "Cropping Applied" message will appear.




  8. Save the page.

Important Step if a Page already has a Hero Photo

IMPORTANT: The FIRST time you edit a web page that has a Hero Photo (the large photo at the top of the page), you MUST:


  1. Click on the Hero Photo section to open up the options.




  2. Click on the thumbnail image once to apply the Crop 16:9 to the Hero image.
     


  3. When you click on the Crop image thumbnail image, you will see a "cropping applied" message in two places.