fix(assets): download and localize all images in public directory, eliminating all external image URLs

This commit is contained in:
vickytechkey 2026-09-10 19:59:19 +05:30
parent 59ee2c8bf0
commit b3557d0698
13 changed files with 18 additions and 25 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

View file

@ -10,7 +10,7 @@ export default function AboutPage() {
<section className="hero is-large" style={{ position: 'relative', overflow: 'hidden', minHeight: '800px' }}> <section className="hero is-large" style={{ position: 'relative', overflow: 'hidden', minHeight: '800px' }}>
<div style={{ <div style={{
position: 'absolute', top: 0, left: 0, right: 0, bottom: 0, position: 'absolute', top: 0, left: 0, right: 0, bottom: 0,
backgroundImage: "url('https://lh3.googleusercontent.com/aida-public/AB6AXuA5mjm6T9CY7j2AtbFE_jEFFkhOzCmc_eKwvgj0hHVKV6AoVKeAf8ZfBnnz4sSYkdzX5gyzlk-pGufTtwpJN5MhYgDAIezV1yaDN8ANw66nZ5kk40-GGDiVWp3eGiPJZ4mIuL_aJp6O1TqJsQihFvPZyfj5VgjH4IQivXEltdrAAUfKSMdbWgNHLi3SP2X5uLF6Xc_gDyYs-tOepA8IuU6_1Q9wcaSebXAQOQhAQAPW7wVcUFGY7crerw')", backgroundImage: "url('/images/about-hero.jpg')",
backgroundSize: 'cover', backgroundSize: 'cover',
backgroundPosition: 'center', backgroundPosition: 'center',
zIndex: 0 zIndex: 0

View file

@ -1,8 +1,7 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { useSeller } from '../../context/SellerContext'; import { useSeller } from '../../context/SellerContext';
const SIGNUP_IMAGE = "https://images.unsplash.com/photo-1606744837616-56c9a5c6a6eb?auto=format&fit=crop&q=80&w=1000"; const SIGNUP_IMAGE = "/images/signup-weaver.jpg";
const SIGNUP_IMAGE_FALLBACK = "https://lh3.googleusercontent.com/aida-public/AB6AXuCltIMM8YbcYMs4QPFOFVNm_ieJNxla5TaKcrFw3or4efQU-wz4mZtq2sWHFvLVv-DN1XfSlcJQUW2BCVrNiTUFnNtUoxVqPqGYiuWoaGFd_GvpHLctklxC9UMMOZOEpSQqEymQUBvpKbz6TNLgcR12JSCy4JZc3VOPKEW4xFquW6T1dSTrTJWcdo7ONH70XsdK4FT6FVZJIkAlD_f4b5iJufeGHaYGTqm4Y7OgBEorWRTGrciNeKxxDA";
export default function AuthForms() { export default function AuthForms() {
const { const {
@ -246,9 +245,6 @@ export default function AuthForms() {
> >
<img <img
src={SIGNUP_IMAGE} src={SIGNUP_IMAGE}
onError={(e) => {
(e.target as HTMLImageElement).src = SIGNUP_IMAGE_FALLBACK;
}}
alt="Indian artisan weaving vibrant traditional textile on handloom" alt="Indian artisan weaving vibrant traditional textile on handloom"
style={{ style={{
position: 'absolute', position: 'absolute',

View file

@ -79,10 +79,7 @@ export default function LoginPage() {
{/* Authentic Artisan Photography Showcase */} {/* Authentic Artisan Photography Showcase */}
<div style={{ borderRadius: '16px', overflow: 'hidden', border: '1px solid #E5E0DC', marginBottom: '1.5rem', boxShadow: '0 2px 8px rgba(0,0,0,0.04)', position: 'relative' }}> <div style={{ borderRadius: '16px', overflow: 'hidden', border: '1px solid #E5E0DC', marginBottom: '1.5rem', boxShadow: '0 2px 8px rgba(0,0,0,0.04)', position: 'relative' }}>
<img <img
src="https://images.unsplash.com/photo-1578749556568-bc2c40e68b61?auto=format&fit=crop&q=80&w=800" src="/images/login-potter.jpg"
onError={(e) => {
(e.target as HTMLImageElement).src = "https://lh3.googleusercontent.com/aida-public/AB6AXuAAFsGHQxH4paIeyYZq8omfEOk4T6ZEJqZYRodaOcQHD0LtVHFHgCIbibIROjn374aCnXLV8lMu_a4PAiB2hSlSCweYGsHwS5Yo_qSy1nNAZPLlYCBJAm4rGsYoeyu_UDpTNR8eQjl_nUnYEjlNe_bS3LYk8VhaJnlE2uy_LsQmUuW-JWNYEqV9vbFeeG1VBgLjqUD7HixjvwxkWx9prT2WTwoTN0fOnHqxndcVNs1jPMAkFLc2y9082g";
}}
alt="Indian artisan potter shaping handcrafted pottery" alt="Indian artisan potter shaping handcrafted pottery"
style={{ width: '100%', height: '180px', objectFit: 'cover', display: 'block' }} style={{ width: '100%', height: '180px', objectFit: 'cover', display: 'block' }}
/> />

View file

@ -18,7 +18,7 @@ export const CONFIG = {
hero: { hero: {
title: 'Sell Globally. Celebrate Craft.', title: 'Sell Globally. Celebrate Craft.',
subtitle: 'Join the premier marketplace for artisans and reach millions of conscious customers worldwide.', subtitle: 'Join the premier marketplace for artisans and reach millions of conscious customers worldwide.',
image: 'https://images.unsplash.com/photo-1513519245088-0e12902e5a38?auto=format&fit=crop&q=80&w=800' image: '/artisan_banner.jpg'
}, },
features: [ features: [
@ -43,7 +43,7 @@ export const CONFIG = {
name: 'Naomi K.', name: 'Naomi K.',
role: 'Master Weaver', role: 'Master Weaver',
quote: '"Joining the Global Artisans Hub has transformed our community. We went from selling at local weekend fairs to serving buyers worldwide, preserving our traditional craft."', quote: '"Joining the Global Artisans Hub has transformed our community. We went from selling at local weekend fairs to serving buyers worldwide, preserving our traditional craft."',
avatar: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?auto=format&fit=crop&q=80&w=300' avatar: '/images/avatars/seller-main.jpg'
}, },
about: { about: {
@ -53,22 +53,22 @@ export const CONFIG = {
{ {
name: 'Sunder R.', name: 'Sunder R.',
role: 'Founder & CEO', role: 'Founder & CEO',
avatar: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?auto=format&fit=crop&q=80&w=150' avatar: '/images/avatars/artisan-1.jpg'
}, },
{ {
name: 'Sarayu N.', name: 'Sarayu N.',
role: 'Head of Artisan Partnerships', role: 'Head of Artisan Partnerships',
avatar: 'https://images.unsplash.com/photo-1494790108377-be9c29b29330?auto=format&fit=crop&q=80&w=150' avatar: '/images/avatars/artisan-2.jpg'
}, },
{ {
name: 'John C.', name: 'John C.',
role: 'Operations Lead', role: 'Operations Lead',
avatar: 'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?auto=format&fit=crop&q=80&w=150' avatar: '/images/avatars/artisan-3.jpg'
}, },
{ {
name: 'Elena P.', name: 'Elena P.',
role: 'Tech Lead', role: 'Tech Lead',
avatar: 'https://images.unsplash.com/photo-1438761681033-6461ffad8d80?auto=format&fit=crop&q=80&w=150' avatar: '/images/avatars/artisan-4.jpg'
} }
] ]
}, },
@ -107,9 +107,9 @@ export const CONFIG = {
}, },
initialProducts: [ initialProducts: [
{ id: '1', title: 'Handwoven Indigo Shawl', category: 'Apparel', price: 85.00, stock: 45, sku: 'SHAWL-IND-01', image: 'https://images.unsplash.com/photo-1544022613-e87ca75a784a?auto=format&fit=crop&q=80&w=100' }, { id: '1', title: 'Handwoven Indigo Shawl', category: 'Apparel', price: 85.00, stock: 45, sku: 'SHAWL-IND-01', image: '/kanchipuram_silk.jpg' },
{ id: '2', title: 'Terracotta Clay Pot Set', category: 'Home Decor', price: 42.00, stock: 24, sku: 'POT-TER-02', image: 'https://images.unsplash.com/photo-1612196808214-b8e1d6145a8c?auto=format&fit=crop&q=80&w=100' }, { id: '2', title: 'Terracotta Clay Pot Set', category: 'Home Decor', price: 42.00, stock: 24, sku: 'POT-TER-02', image: '/terracotta_vases.jpg' },
{ id: '3', title: 'Brass Elephant Figurine', category: 'Sculptures', price: 120.00, stock: 12, sku: 'FIG-ELE-03', image: 'https://images.unsplash.com/photo-1590736969955-71cc94801759?auto=format&fit=crop&q=80&w=100' } { id: '3', title: 'Brass Elephant Figurine', category: 'Sculptures', price: 120.00, stock: 12, sku: 'FIG-ELE-03', image: '/brass_figurine.jpg' }
], ],
initialOrders: [ initialOrders: [
@ -119,8 +119,8 @@ export const CONFIG = {
], ],
initialReturns: [ initialReturns: [
{ id: 'RET-019', orderId: 'ORD-8411', customer: 'Lillian G.', item: 'Handwoven Indigo Shawl', reason: 'Slightly different shade than pictured', status: 'Pending Approval', image: 'https://images.unsplash.com/photo-1544022613-e87ca75a784a?auto=format&fit=crop&q=80&w=100', returningTracking: 'DHL-RET-9031' }, { id: 'RET-019', orderId: 'ORD-8411', customer: 'Lillian G.', item: 'Handwoven Indigo Shawl', reason: 'Slightly different shade than pictured', status: 'Pending Approval', image: '/kanchipuram_silk.jpg', returningTracking: 'DHL-RET-9031' },
{ id: 'RET-018', orderId: 'ORD-8390', customer: 'Robert H.', item: 'Terracotta Clay Pot Set', reason: 'Damaged in transit', status: 'In Transit', image: 'https://images.unsplash.com/photo-1612196808214-b8e1d6145a8c?auto=format&fit=crop&q=80&w=100', returningTracking: 'FDX-RET-2940' } { id: 'RET-018', orderId: 'ORD-8390', customer: 'Robert H.', item: 'Terracotta Clay Pot Set', reason: 'Damaged in transit', status: 'In Transit', image: '/terracotta_vases.jpg', returningTracking: 'FDX-RET-2940' }
] ]
} }
} }

View file

@ -171,7 +171,7 @@ export const SellerProvider: React.FC<{children: React.ReactNode}> = ({ children
price: 0, price: 0,
stock: 0, stock: 0,
sku: '', sku: '',
image: 'https://images.unsplash.com/photo-1544022613-e87ca75a784a?auto=format&fit=crop&q=80&w=100' image: '/kanchipuram_silk.jpg'
}) })
const [isEditingProduct, setIsEditingProduct] = useState(false) const [isEditingProduct, setIsEditingProduct] = useState(false)
@ -183,7 +183,7 @@ export const SellerProvider: React.FC<{children: React.ReactNode}> = ({ children
category: 'Textiles & Apparel', category: 'Textiles & Apparel',
description: '', description: '',
isGiTagged: false, isGiTagged: false,
primaryImage: 'https://images.unsplash.com/photo-1544022613-e87ca75a784a?auto=format&fit=crop&q=80&w=300', primaryImage: '/kanchipuram_silk.jpg',
additionalViews: [] as string[], additionalViews: [] as string[],
videoUrl: '', videoUrl: '',
view360Url: '', view360Url: '',
@ -651,7 +651,7 @@ export const SellerProvider: React.FC<{children: React.ReactNode}> = ({ children
aadhar_s3_key: aadharS3Key || null, aadhar_s3_key: aadharS3Key || null,
pan_s3_key: panS3Key || null, pan_s3_key: panS3Key || null,
store_name: storeName, store_name: storeName,
store_logo: storeLogo || 'https://images.unsplash.com/photo-1513519245088-0e12902e5a38?auto=format&fit=crop&q=80&w=800', store_logo: storeLogo || '/artisan_banner.jpg',
logo_s3_key: logoS3Key || null, logo_s3_key: logoS3Key || null,
business_bio: businessBio, business_bio: businessBio,
street: address.street, street: address.street,
@ -716,7 +716,7 @@ export const SellerProvider: React.FC<{children: React.ReactNode}> = ({ children
.catch(err => console.error(err)) .catch(err => console.error(err))
// reset form // reset form
setProductForm({ id: '', title: '', category: 'Apparel', price: 0, stock: 0, sku: '', image: 'https://images.unsplash.com/photo-1544022613-e87ca75a784a?auto=format&fit=crop&q=80&w=100' }) setProductForm({ id: '', title: '', category: 'Apparel', price: 0, stock: 0, sku: '', image: '/kanchipuram_silk.jpg' })
} }
const handleEditClick = (p: Product) => { const handleEditClick = (p: Product) => {