๐ The Problem
Email clients require absolute URLs for images (e.g., https://example.com/logo.png), not relative paths (e.g., logo.png).
src="logo.png". These work in a browser but fail in email clients because the images aren't accessible from the recipient's email server.
โ Solution Options
Option 1: Host on Your Website (RECOMMENDED)
Upload images to your ARK G.K. website at https://www.arkgk.co.jp/email-assets/
Pros: Professional, your own domain, full control
Setup:
- Create folder:
/email-assets/on www.arkgk.co.jp - Upload: logo.png, property1.jpg, property2.jpg, property3.jpg, placeholder.jpg
- Edit
config.phpand set:'base_url' => 'https://www.arkgk.co.jp/email-assets'
Option 2: Use CDN (Cloudflare, AWS S3, etc.)
Upload images to a CDN for fast, reliable delivery
Pros: Fast loading, high availability, global delivery
Setup:
- Create CDN bucket/storage
- Upload all email images
- Get public URL (e.g.,
https://cdn.example.com/ark-emails/) - Update
config.phpwith CDN URL
Option 3: GitHub Pages (Free, Good for Testing)
Use GitHub to host images for free
Pros: Free, version control, easy updates
Setup:
- Push this repo to GitHub
- Enable GitHub Pages in repo settings
- Images will be at:
https://clickmark.github.io/ark-email-templates/ - Update
config.phpwith GitHub Pages URL
โ๏ธ Configuration Steps
Step 1: Edit config.php
Open config.php and update the base_url:
// Update this URL to where your images are hosted
'base_url' => 'https://www.arkgk.co.jp/email-assets',
// ... rest of config ...
];
Step 2: Upload Images
Upload these files to your hosting location:
- logo.png (6.3 KB)
- property1.jpg (219 KB)
- property2.jpg (173 KB)
- property3.jpg (263 KB)
- placeholder.jpg (2.2 KB)
Step 3: Test Image URLs
After uploading, verify each image is accessible by visiting the URLs in your browser:
https://www.arkgk.co.jp/email-assets/property1.jpg
https://www.arkgk.co.jp/email-assets/property2.jpg
https://www.arkgk.co.jp/email-assets/property3.jpg
https://www.arkgk.co.jp/email-assets/placeholder.jpg
๐งช Testing
Current Configuration
Test Image Loading
These images should load if your configuration is correct:
Logo
https://www.arkgk.co.jp/email-assets/logo.png
Property 1
https://www.arkgk.co.jp/email-assets/property1.jpg
๐ง Troubleshooting
Images don't load in test above
- Check
config.phphas correctbase_url - Verify images are uploaded to the hosting location
- Test each image URL directly in browser
- Check file permissions (images should be publicly readable)
- Ensure no typos in URLs or filenames
Images load in test but not in emails
- Some email clients block images by default (user must click "Load Images")
- Check email client's image blocking settings
- Verify sender authentication (SPF, DKIM, DMARC) to avoid being marked as spam
- Use a different email provider to test
SendGrid Authentication Setup
To improve deliverability and ensure images load:
- Go to SendGrid Dashboard โ Settings โ Sender Authentication
- Authenticate your domain (www.arkgk.co.jp)
- Set up SPF and DKIM records in your DNS
- Configure DMARC policy
- Verify sender email address (info@arkgk.co.jp)