Viewing file size etc metadata

For reasons… I wanted to check the file size of an image I have in a gallery. I’ve found out how to view and edit some metadata including the caption and keywords. But no clues of file size or dimensions. Because I can’t find them or they’re not available to view in Backlight?

Thanks.

The only way I know how is to go to the image permalink, right-click and save the image to your computer and check the file properties.

There may be a way with scripting via phplugins to display file size and dimension, but that would be publicly viewable. (See Backlight JSON API)

Maybe @Daniel will weigh in. He often does clever things with Backlight.

Here’s an example using phplugins to add some additional image information to the single image pages:

function single_bottom() {
   if ($this->hasPhoto()) {
      $photo = $this->photo;
      $ph_path = $photo->getUrl('photos');
      $ph_file = $ph_path . '/' . $photo->getFilename();
      $ph_size = filesize($ph_file);
      $ph_w = $photo->getPhotoWidth();
      $ph_h = $photo->getPhotoHeight();

      echo '<p>';        
      echo 'Image size: ' . $ph_size;
      echo 'Image width: ' . $ph_w;
      echo 'Image height: ' . $ph_h;
      echo '</p>';
   }
}

Hope this helps!

1 Like

Thanks everyone. I usually upload a specific size so should know most but I’ve uploaded some picture which look low quality and I wonder what size they are.

No matter, its only a couple or three so I won’t go to too much trouble. But that code may come in handy…

Meanwhile I should learn how to upload with the Lightroom plugin. I guess that would give me more details.