Pictures

A website's Pictures page is a view of the Websites folder in Files: the website's own subfolder (named for the website, made when you add its first picture), and any picture linked to it from another folder. Add a picture to a website once, with a description for visitors who cannot see it, then use it in a hero or image block, or as a social picture.

!The Pictures screen of a website with its uploaded pictures.

!The Pictures screen of a website with its uploaded pictures, in dark mode.

!The Pictures screen of a website with its uploaded pictures, on a phone.

!The Pictures screen of a website with its uploaded pictures, on a phone in dark mode.

  • Add Picture opens the same Upload Review as Files, fixed to this website's folder (for example "Websites | Acme Test Co", made once with core.files.app_subfolder). It checks each file first: a PDF or any file that is not a PNG, JPEG, WebP, or GIF picture is listed under Cannot Be Uploaded in plain words ("price-sheet.pdf is not a picture. Pictures here are PNG, JPEG, WebP, or GIF."), as are a file over 10 GB and an empty file, and the pictures go on. The Upload Review asks Who Can Load This, with Private selected, and a name already in the folder can be kept as name (2).ext, replaced with a new version, or skipped. Nothing is sent until you press Upload. Then the pictures go into the upload tray with every other upload (Uploading Many Files): each picture is used on the website as it is stored and appears in the list on its own, and the list is not reloaded for each picture. There is no Description at upload, because one description cannot fit thirty different pictures. A replaced picture keeps the description it had.
  • Choose From Files links a picture that is already in another folder. Nothing is copied, and the picture stays where it was.
  • Each row has a Private or Public chip, and says whether the picture is kept in this website's folder or linked from another folder.
  • See the pictures (action sites.asset.list): with the true total. Search by 2 or more letters of the name or description, sort by name or last edited, and page 50 at a time with the cursor the answer gives. With none of those it lists up to 500, as it always did, now with the true total beside them. The answer also names the website's folder, and says for each picture whether it is kept in that folder (in_folder) and its visibility.
  • Use a picture from Files on a website (action sites.asset.add): PNG, JPEG, WebP, and GIF files only. You must be able to see the file. SVG drawings are refused because they can carry code.
  • Remove a picture from a website, or bring it back (action sites.asset.remove): this removes the link and the file stays in Files, in the folder it is kept in.

A picture you add is a link to the file in Files, never a copy, and it shows under the file's Used In. Visitors can load a picture only while its file is Public or from before Who Can Load a File; a Private picture shows as its description, and Publish tells you before it goes live.

The Pictures List

Pictures is a list that loads 50 at a time as you scroll, with the true count at the top. Search finds a picture by its name or description once you have typed 2 letters. Each row has the name, the description (or "No description yet"), the type, when it was last edited, a chip for Private or Public, a chip when it came from GitHub, an Edit Description button, and a Remove button (people who can edit). A box on each row ticks it, and Remove on the bar that appears stops using all the ticked pictures after telling you how many. The files stay in Files.

Needs a Description

A picture with no description shows a Needs a Description chip, and a line above the list says how many ("12 pictures need a description"). Edit Description on a row saves it, and the chip and the count follow. A description is what visitors who cannot see the picture hear instead. The sites.asset.list answer carries the count as need_alt.

Pictures From GitHub

A page kept in step with a GitHub repository can bring its pictures with it. A picture that came from GitHub shows From GitHub, with its file and commit, on the Pictures list, and is changed in GitHub (Remove still stops using it here). The Pictures list, the websites_pictures tool, and an assistant see where each picture came from. See Pictures From GitHub.

Favicon

A website's favicon is set in Settings, Favicon (a website's own Settings), with three choices (action sites.site.save, setting favicon):

  • Use my Brand Kit favicon: PNG, WebP, or a plain SVG from Settings, Brand. A kit SVG is checked for script when it is added, so it is safe.
  • Use a picture from this website: a square PNG from 32 to 512 pixels. SVG, JPEG, WebP, and GIF pictures cannot be a favicon (an SVG picture can carry code), and saving one is refused with a plain sentence. The size is checked when the website is built; a picture that does not fit is left out and the Favicon card says why.
  • None: browsers show their own icon.

An ICO file is not accepted: it can hold several images and has a history of reader bugs. Browsers use the PNG or SVG, and /favicon.ico on your website answers with the PNG's bytes (never an ICO file). A picture of 180 pixels or more, or your Brand Kit icon, also serves as the touch icon. Nothing changes on a website until its owner chooses one and publishes.

Serving pictures to visitors on your own address is part of the serving platform (Planned).

Where to Find It

Websites, then Pictures. Anyone who may see websites sees it; adding and removing pictures needs edit access.