From 6f975533f075cc761184b5a7392522264eca6fc1 Mon Sep 17 00:00:00 2001 From: Ken D'Ambrosio Date: Thu, 18 Jun 2026 23:00:17 +0000 Subject: Add per-photo rotate-left/right widget to admin edit page Many older photos (especially pre-EXIF-orientation cameras) are off by a multiple of 90 degrees with no metadata to auto-correct. Each image row in the admin file table now has rotate buttons that physically rotate the file (auto-orienting first to normalize any existing EXIF tag), swap the stored width/height, and clear the cached thumbnail so it regenerates from the corrected image. Co-Authored-By: Claude Sonnet 4.6 --- views/admin/album.erb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'views/admin') diff --git a/views/admin/album.erb b/views/admin/album.erb index 8c9ebe1..d1b8cb8 100644 --- a/views/admin/album.erb +++ b/views/admin/album.erb @@ -63,6 +63,7 @@ Caption Visible Cover + Rotate Delete @@ -70,6 +71,7 @@ <% @files.each do |name| %> <% meta = (@data['files'] || {})[name] || {} %> <% file_rel = @rel.empty? ? name : "#{@rel}/#{name}" %> + <% is_image = IMAGE_EXTS.include?(File.extname(name).downcase.delete_prefix('.')) %> > @@ -84,6 +86,15 @@ > + + <% if is_image %> +
+ + + +
+ <% end %> + -- cgit v1.2.3