Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/$%7Burl%7D?q=image&page=1&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=image

Returns an array of strings in format "username" or "username/projectName"

Found 10953 results for "image"(5600ms)

orisapp.tsx23 matches

@solomonferedeezez•Updated 41 mins ago
7 FONTS,
8 hashPassword,
9 SERVICE_IMAGES,
10 testimonials,
11 variantStyles,
301 title,
302 style = {},
303 image,
304 imageAlt = "",
305 imageHeight = "200px",
306 animation = "slideUp",
307 }: {
309 title?: string;
310 style?: React.CSSProperties;
311 image?: string;
312 imageAlt?: string;
313 imageHeight?: string;
314 animation?: "fadeIn" | "slideUp";
315 }) => {
327 }}
328 >
329 {image && (
330 <div
331 style={{
332 margin: "-24px -24px 24px -24px",
333 height: imageHeight,
334 overflow: "hidden",
335 position: "relative",
337 >
338 <img
339 src={image}
340 alt={imageAlt}
341 style={{
342 width: "100%",
755 textAlign: "center",
756 padding: "80px 20px",
757 background: `linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url(${SERVICE_IMAGES.hero})`,
758 backgroundSize: "cover",
759 backgroundPosition: "center",
993 title="Schools & Colleges"
994 style={{ borderTop: `4px solid ${COLORS.primary}` }}
995 image={SERVICE_IMAGES.school}
996 imageAlt="School management system"
997 >
998 <p>Student management, grading, and scheduling systems to streamline educational administration.</p>
1008 title="Hospitals"
1009 style={{ borderTop: `4px solid ${COLORS.secondary}` }}
1010 image={SERVICE_IMAGES.hospital}
1011 imageAlt="Hospital management system"
1012 >
1013 <p>
1025 title="Factories"
1026 style={{ borderTop: `4px solid ${COLORS.accent}` }}
1027 image={SERVICE_IMAGES.factory}
1028 imageAlt="Factory management system"
1029 >
1030 <p>Product tracking, resource planning, and process automation for manufacturing efficiency.</p>
1040 title="Organizations"
1041 style={{ borderTop: `4px solid ${COLORS.primaryLight}` }}
1042 image={SERVICE_IMAGES.organization}
1043 imageAlt="Organization management system"
1044 >
1045 <p>Employee management systems for HR, payroll, and attendance tracking.</p>
1097 <div style={{ flex: 1, minWidth: "300px" }}>
1098 <img
1099 src={SERVICE_IMAGES.website}
1100 alt="Website development"
1101 style={{
1133 <div style={{ flex: 1, minWidth: "300px" }}>
1134 <img
1135 src={SERVICE_IMAGES.networking}
1136 alt="Networking solutions"
1137 style={{
1235 minWidth: "300px",
1236 height: "300px",
1237 background: `url(${SERVICE_IMAGES.gps}) center/cover no-repeat`,
1238 position: "relative",
1239 }}

orismain.tsx1 match

@solomonferedeezez•Updated 54 mins ago
223 }
224 </style>
225 <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>💻</text></svg>">
226 </head>
227 <body>

orisconstants.tsx10 matches

@solomonferedeezez•Updated 55 mins ago
23};
24
25// Service images
26export const SERVICE_IMAGES = {
27 school:
28 "https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80",
29 hospital:
30 "https://images.unsplash.com/photo-1579684385127-1ef15d508118?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80",
31 factory:
32 "https://images.unsplash.com/photo-1504275107627-0c2ba7a43b1a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1374&q=80",
33 organization:
34 "https://images.unsplash.com/photo-1521737711867-e3b97375f902?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1374&q=80",
35 website:
36 "https://images.unsplash.com/photo-1547658719-da2b51169166?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1528&q=80",
37 networking:
38 "https://images.unsplash.com/photo-1558494949-ef010cbdcc31?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1374&q=80",
39 gps:
40 "https://images.unsplash.com/photo-1501706362039-c06b2d715385?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1374&q=80",
41 hero:
42 "https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1472&q=80",
43};
44

untitled-6961main.tsx26 matches

@join•Updated 1 hour ago
10// --- AI CREATIVE DIRECTION PROMPT ---
11const COMPOSITION_AI_PROMPT = `
12You are a master vector artist. Your task is to decide how to combine two sets of SVG paths: a 'text' shape and an 'image' texture shape. Your goal is to create the most artistic and meaningful composition based on the user's original phrase. You MUST respond ONLY with a single, minified JSON object.
13The JSON schema must be:
14{
22 "stroke_width": "A number, e.g., 1.5"
23 },
24 "image_style": {
25 "fill": "A hex color. This will be the fill for the image paths."
26 }
27 }
57}
58
59// --- IMAGE VECTORIZATION LOGIC (CANVAS-FREE) ---
60async function getImagePath(imageUrl: string): Promise<{ path: string; width: number; height: number }> {
61 const imageResponse = await fetch(imageUrl);
62
63 // **FIX: Add robust checking for the fetch response.**
64 if (!imageResponse.ok) {
65 throw new Error(`Source image URL failed with status ${imageResponse.status}: ${imageResponse.statusText}`);
66 }
67 const contentType = imageResponse.headers.get("content-type");
68 if (!contentType || !contentType.startsWith("image/png")) {
69 throw new Error(`Expected image/png from source, but received ${contentType || "no content type"}.`);
70 }
71
72 // Now it's safe to decode the buffer.
73 const pngBuffer = new Uint8Array(await imageResponse.arrayBuffer());
74 const decodedPng = decode(pngBuffer);
75 const { width, height, data } = decodedPng;
159 outline: 0;
160 }
161 #image-display {
162 margin-top: 1.5rem;
163 background-color: var(--card-bg);
169 transition: all .3s;
170 }
171 #image-display.loading {
172 animation: pulse 1.5s cubic-bezier(.4, 0, .6, 1) infinite;
173 }
176 50% { opacity: .7; }
177 }
178 #image-display img {
179 width: 100%;
180 height: auto;
196 <input type="text" id="phrase-input" placeholder="Enter a phrase and press Enter...">
197 </div>
198 <div id="image-display">
199 <div class="placeholder" id="placeholder">
200 <h3>Your generative art will appear here</h3>
205 (function() {
206 const input = document.getElementById("phrase-input");
207 const display = document.getElementById("image-display");
208 const baseUrl = \`\${sourceUrl.endsWith("/") ? sourceUrl : sourceUrl + "/"}\`;
209
219 const encoded = encodeURIComponent(phrase);
220 const url = \`\${baseUrl}generate/\${encoded}.svg\`;
221 const img = new Image();
222 img.src = url;
223
254app.get("/generate/:phrase{.+\\.svg}", async (c) => {
255 const phrase = decodeURIComponent(c.req.param("phrase").replace(/\.svg$/, ""));
256 const imageUrl = `https://maxm-imggenurl.web.val.run/${encodeURIComponent(phrase)}.png`;
257
258 try {
259 const [aiDecision, imageVect] = await Promise.all([
260 openai.chat.completions.create({
261 model: "gpt-4o",
263 response_format: { type: "json_object" },
264 }),
265 getImagePath(imageUrl),
266 ]);
267
268 const composition = JSON.parse(aiDecision.choices[0].message.content).composition;
269 const { method, text_style, image_style } = composition;
270
271 const textPaths = await getTextPaths(phrase, text_style.font);
272 const { path: imagePath, width, height } = imageVect;
273
274 let finalSvg =
277 finalSvg += `<defs><clipPath id="text-clip">${
278 textPaths.map(d => `<path d="${d}" />`).join("")
279 }</clipPath></defs><g clip-path="url(#text-clip)"><path d="${imagePath}" fill="${image_style.fill}" /></g>`;
280 } else {
281 finalSvg +=
282 `<path d="${imagePath}" fill="${image_style.fill}" /><g fill="${text_style.fill}" stroke="${text_style.stroke}" stroke-width="${text_style.stroke_width}">${
283 textPaths.map(d => `<path d="${d}" />`).join("")
284 }</g>`;
286 finalSvg += `</svg>`;
287
288 return new Response(finalSvg, { headers: { "Content-Type": "image/svg+xml" } });
289 } catch (error) {
290 console.error("Full pipeline error:", error);

thilenius-webcamwebcam.tsx7 matches

@stabbylambda•Updated 4 hours ago
4 const url = new URL(req.url);
5 const camera = (url.pathname == "/") ? "camera1" : url.pathname.slice(1);
6 const response = await fetch("https://gliderport.thilenius.com/gpapi/getLastFiveSmallImages");
7 const json = await response.json();
8
9 // Grab the last image (should probably sort by date, but whatever.) Convert base64 string to a buffer
10 const lastImage = json?.[camera]?.[4]?.image;
11 if (!lastImage) {
12 return new Response("No image found", { status: 404 });
13 }
14 const imageBuffer = Buffer.from(lastImage, "base64");
15
16 return new Response(imageBuffer, { headers: { "content-type": "image/png" } });
17}

lynkoindex.html1 match

@lynko•Updated 5 hours ago
11
12 <!-- reference the webpage's favicon. note: currently only svg is supported in val town files -->
13 <link rel="icon" href="/favicon.svg" sizes="any" type="image/svg+xml">
14
15 <!-- import the webpage's javascript file -->

thirdTimervaltown.mdc2 matches

@dreev•Updated 5 hours ago
160
161- **Redirects:** Use `return new Response(null, { status: 302, headers: { Location: "/place/to/redirect" }})` instead of `Response.redirect` which is broken
162- **Images:** Avoid external images or base64 images. Use emojis, unicode symbols, or icon fonts/libraries instead
163- **AI Image:** To inline generate an AI image use: `<img src="https://maxm-imggenurl.web.val.run/the-description-of-your-image" />`
164- **Storage:** DO NOT use the Deno KV module for storage
165- **Browser APIs:** DO NOT use the `alert()`, `prompt()`, or `confirm()` methods

thirdTimerindex.html1 match

@dreev•Updated 5 hours ago
4 <meta charset="UTF-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6 <link rel="icon" type="image/x-icon" href="/favicon.svg" />
7
8 <title>Third Timer</title>

thirdTimerfavicon.http.tsx1 match

@dreev•Updated 5 hours ago
26 return new Response(svg, {
27 headers: {
28 "Content-Type": "image/svg+xml",
29 },
30 });

sqliteadminREADME.md1 match

@peterqliu•Updated 6 hours ago
3This is a lightweight SQLite Admin interface to view and debug your SQLite data.
4
5![Screenshot 2023-12-08 at 13.35.04.gif](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/ee9a9237-96a0-4276-60b5-aa8c56e49800/public)
6
7It's currently super limited (no pagination, editing data, data-type specific viewers), and is just a couple dozens lines of code over a couple different vals. Forks encouraged! Just comment on the val if you add any features that you want to share.

thilenius-webcam1 file match

@stabbylambda•Updated 4 hours ago
Image proxy for the latest from https://gliderport.thilenius.com

simple-images1 file match

@blazemcworld•Updated 5 days ago
simple image generator using pollinations.ai
Chrimage
Atiq
"Focal Lens with Atig Wazir" "Welcome to my photography journey! I'm Atiq Wazir, a passionate photographer capturing life's beauty one frame at a time. Explore my gallery for stunning images, behind-the-scenes stories, and tips & tricks to enhance your own