Baoyu Xhs Images
Baoyu Xhs Images automation and integration for smooth image management workflows
Baoyu Xhs Images is a community skill for generating and optimizing images for Xiaohongshu (Little Red Book) posts, covering image sizing, text overlay, watermark placement, filter application, and carousel image preparation for the Xiaohongshu content platform.
What Is This?
Overview
Baoyu Xhs Images provides patterns for creating images that meet Xiaohongshu platform requirements and visual standards. It covers image sizing that crops and resizes images to Xiaohongshu-preferred aspect ratios such as 3:4 and 1:1, text overlay that adds styled title and body text to images for visually engaging covers, watermark placement that positions brand or account watermarks without obscuring content, filter application that applies color grading and filters matching popular Xiaohongshu aesthetics, and carousel preparation that generates a set of sequential images for multi-image posts. The skill enables content creators to produce platform-optimized visual content.
Who Should Use This
This skill serves Xiaohongshu content creators producing visual posts for their accounts, marketing teams managing brand presence on the Xiaohongshu platform, and developers building publishing tools that target Chinese social media.
Why Use It?
Problems It Solves
Xiaohongshu has specific image dimension requirements that differ from other platforms. Cover images need styled text overlays to attract engagement on the discovery feed. Creating consistent visual styles across multiple posts requires repeatable processing. Preparing carousel posts with numbered sequential images is manual without automation.
Core Highlights
Image resizer crops to Xiaohongshu aspect ratios with smart subject centering. Text renderer adds styled titles with shadows, outlines, and backgrounds. Filter engine applies preset color grading for consistent post aesthetics. Carousel builder generates numbered multi-image sets from content sections.
How to Use It?
Basic Usage
from PIL import Image,\
ImageDraw, ImageFont,\
ImageFilter
class XhsImageProcessor:
RATIOS = {
'cover': (3, 4),
'square': (1, 1),
'wide': (4, 3),
}
def __init__(
self,
width: int = 1080,
font_path: str = None
):
self.width = width
self.font_path =\
font_path
def resize(
self,
img: Image.Image,
ratio: str = 'cover'
) -> Image.Image:
rw, rh = self.RATIOS[
ratio]
target_h = int(
self.width * rh / rw)
img = img.resize(
(self.width, target_h),
Image.LANCZOS)
return img
def add_text_overlay(
self,
img: Image.Image,
title: str,
position: str\
= 'center'
) -> Image.Image:
draw = ImageDraw.Draw(img)
font = ImageFont.truetype(
self.font_path, 64)\
if self.font_path\
else ImageFont\
.load_default()
bbox = draw.textbbox(
(0, 0), title,
font=font)
tw = bbox[2] - bbox[0]
th = bbox[3] - bbox[1]
x = (img.width - tw) // 2
y = (img.height - th) // 2
# Shadow for readability
draw.text(
(x+2, y+2), title,
fill='black',
font=font)
draw.text(
(x, y), title,
fill='white',
font=font)
return imgReal-World Examples
from pathlib import Path
def generate_carousel(
sections: list[dict],
output_dir: str,
bg_color: str\
= '#fef3c7',
width: int = 1080
) -> list[str]:
out = Path(output_dir)
out.mkdir(exist_ok=True)
height = int(
width * 4 / 3)
files = []
for i, sec\
in enumerate(sections):
img = Image.new(
'RGB',
(width, height),
bg_color)
draw = ImageDraw\
.Draw(img)
# Page number
draw.text(
(width - 80, 40),
f'{i+1}/{len(sections)}',
fill='#666666')
# Title
draw.text(
(60, 120),
sec['title'],
fill='#1a1a1a')
# Body text
draw.text(
(60, 260),
sec.get('body', ''),
fill='#333333')
path = out / f'{i+1}.png'
img.save(str(path))
files.append(str(path))
return filesAdvanced Tips
Use 3:4 aspect ratio for cover images as this occupies the largest area in the Xiaohongshu discovery feed. Apply a slight Gaussian blur to background areas behind text for improved readability. Include page numbers on carousel images to encourage users to swipe through the full set.
When to Use It?
Use Cases
Generate a set of carousel images from article content for a Xiaohongshu tutorial post. Create branded cover images with text overlays for product review posts. Build a batch processing pipeline that formats images from a content calendar for daily Xiaohongshu publishing.
Related Topics
Xiaohongshu content creation, social media images, image processing, Chinese social media, and visual marketing.
Important Notes
Requirements
Pillow library for image processing and text rendering. Font files supporting Chinese characters for text overlays. Source images or background templates for post creation.
Usage Recommendations
Do: use 1080 pixels width as the minimum resolution for sharp display on mobile devices. Test text readability on both light and dark background images. Keep carousel sets between 4 and 9 images for optimal engagement.
Don't: exceed 20 megabytes per image which Xiaohongshu rejects during upload. Use font sizes below 36 pixels which become unreadable on mobile screens. Overlay text across the entire image which reduces visual appeal.
Limitations
Text rendering quality depends on available font files and may lack anti-aliasing refinement. Platform image compression may reduce quality of detailed graphics. Automated layouts cannot replicate the nuance of manual graphic design composition.
More Skills You Might Like
Explore similar skills to enhance your workflow
Json Canvas
Manage infinite canvas data structures with automated JSON Canvas formatting and visual tool integration
Github
Github automation and integration for streamlined code collaboration and version control
Cobrapy
COBRApy metabolic modeling automation and integration for biological research
Outlook
Microsoft Outlook API integration with managed OAuth. Read, send, and manage emails, folders
Affinda Automation
Automate Affinda operations through Composio's Affinda toolkit via Rube
Timeline Creator
Create HTML timelines and project roadmaps with Gantt charts, milestones, phase groupings, and progress indicators. Use when users request timelines,