From 0918ffd291c7cbe070b76a0c9ba100719fbcc2c2 Mon Sep 17 00:00:00 2001
From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com>
Date: Sat, 28 Feb 2026 19:22:57 +0000
Subject: [PATCH] Adjust image cropping to better display faces in photos
Apply `objectPosition: "center 25%"` to all relevant image elements across the client application to ensure faces are consistently visible and not cropped out by the `object-cover` CSS property. This change impacts components in `photo-gallery`, `article`, `category`, and `home` pages.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 413891e8-d784-4bea-b9f5-91a5a68316b4
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 6fbb209e-0312-4027-963a-b6aa098cc025
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/413891e8-d784-4bea-b9f5-91a5a68316b4/RVXhOPb
Replit-Helium-Checkpoint-Created: true
---
client/src/components/horoscope-widget.tsx | 1 +
client/src/components/photo-gallery.tsx | 3 ++-
client/src/pages/article.tsx | 1 +
client/src/pages/category.tsx | 1 +
client/src/pages/home.tsx | 8 ++++----
5 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/client/src/components/horoscope-widget.tsx b/client/src/components/horoscope-widget.tsx
index b2fc66f..1faa9e7 100644
--- a/client/src/components/horoscope-widget.tsx
+++ b/client/src/components/horoscope-widget.tsx
@@ -1,4 +1,5 @@
import { useState, useEffect, useCallback } from "react";
+import { useLocation } from "wouter";
import { Star, ChevronLeft, ChevronRight, X } from "lucide-react";
const SIGNS = [
diff --git a/client/src/components/photo-gallery.tsx b/client/src/components/photo-gallery.tsx
index 44de15c..64b1607 100644
--- a/client/src/components/photo-gallery.tsx
+++ b/client/src/components/photo-gallery.tsx
@@ -114,7 +114,8 @@ function SingleImageCarousel({
diff --git a/client/src/pages/article.tsx b/client/src/pages/article.tsx
index 0b25826..45479e8 100644
--- a/client/src/pages/article.tsx
+++ b/client/src/pages/article.tsx
@@ -74,6 +74,7 @@ function RelatedArticles({ currentSlug }: { currentSlug: string }) {
src={article.coverImage ? article.coverImage.replace(".webp", "-thumb.webp") : "/images/article-1.png"}
alt={article.title}
className="w-full aspect-video object-cover transition-transform duration-500 group-hover:scale-105"
+ style={{ objectPosition: "center 25%" }}
loading="lazy"
/>
diff --git a/client/src/pages/category.tsx b/client/src/pages/category.tsx
index ff73de4..ab03736 100644
--- a/client/src/pages/category.tsx
+++ b/client/src/pages/category.tsx
@@ -60,6 +60,7 @@ export default function CategoryPage() {
src={article.coverImage || "/images/article-1.png"}
alt={article.title}
className="w-full aspect-video object-cover transition-transform duration-500 group-hover:scale-105"
+ style={{ objectPosition: "center 25%" }}
loading="lazy"
/>
diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx
index 921c91a..28c1dbb 100644
--- a/client/src/pages/home.tsx
+++ b/client/src/pages/home.tsx
@@ -44,7 +44,7 @@ function HeroCard({ article }: { article: Article }) {