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/image-url.jpg%20%22Optional%20title%22?q=image&page=7&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 12680 results for "image"(1013ms)

Townie-Al2Header.tsx2 matches

@prubeandoAl•Updated 2 days ago
73
74function Avatar ({ user }) {
75 if (!user?.profileImageUrl) {
76 return (
77 <div className="avatar" />
81 return (
82 <img
83 src={user.profileImageUrl}
84 alt={user.username}
85 width="32"

Townie-Al2favicon.http.tsx1 match

@prubeandoAl•Updated 2 days ago
10 return new Response(svg, {
11 headers: {
12 "Content-Type": "image/svg+xml",
13 },
14 });

Townie-Al2dashboard.ts3 matches

@prubeandoAl•Updated 2 days ago
12 total_price: number;
13 inference_price: number;
14 total_images: number;
15 used_inference_data?: boolean;
16}
44 <th>Total Price</th>
45 <th>Inference Price</th>
46 <th>Images</th>
47 </tr>
48 </thead>
59 <td class="price">${formatPrice(row.total_price)} ${row.used_inference_data ? '<span class="badge badge-info" title="Using inference data">I</span>' : ''}</td>
60 <td class="price">${formatPrice(row.inference_price || 0)}</td>
61 <td>${formatNumber(row.total_images)}</td>
62 </tr>
63 `).join("")}

Townie-Al2.cursorrules2 matches

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

Townie-Al2ChatRouteSingleColumn.tsx15 matches

@prubeandoAl•Updated 2 days ago
10import { useCreditBalance } from "../hooks/useCreditBalance.tsx";
11import { Messages } from "./Messages.tsx";
12import { InputBox, ImageDropContainer } from "./InputBox.tsx";
13import { PreviewFrame } from "./PreviewFrame.tsx";
14import { BranchSelect } from "./BranchSelect.tsx";
68 refetch: () => void;
69}) {
70 const [images, setImages] = useState<(string|null)[]>([]);
71 const [selectedFiles, setSelectedFiles] = useState<string[]>([]);
72 const { audio, user } = useContext(AppContext);
88 branchId,
89 selectedFiles,
90 images,
91 soundEnabled: audio,
92 });
137
138 return (
139 <ImageDropContainer
140 running={running}
141 images={images}
142 setImages={setImages}>
143 <div className="single-column-container">
144 <div className="single-sticky-header">
148 rel="norefferer"
149 className="block-link text-link lockup">
150 {project.imageUrl ? (
151 <img src={project.imageUrl} className="image-thumbnail" />
152 ) : user?.profileImageUrl ? (
153 <img
154 src={user.profileImageUrl}
155 className="avatar"
156 alt={user.username}
159 />
160 ) : (
161 <div className="image-placeholder" />
162 )}
163 <div>{project.name}</div>
211 onSubmit={e => {
212 handleSubmit(e);
213 setImages([]);
214 }}
215 onCancel={handleStop}
216 running={running}
217 error={error}
218 images={images}
219 setImages={setImages}
220 />
221 )}
223 </div>
224 </div>
225 </ImageDropContainer>
226 );
227}

Welcome-to-Valwelcome.ts2 matches

@sannsusen•Updated 2 days ago
28 <meta name="viewport" content="width=device-width, initial-scale=1.0">
29 <title>Welcome to Val Town Powered Website</title>
30 <link rel="icon" href="https://www.val.town/favicon.svg?dot=false" type="image/svg+xml">
31 <link rel="preconnect" href="https://fonts.googleapis.com">
32 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
267 <!-- Upper Section: Greeting -->
268 <section class="header-section">
269 <img src="https://sanuja.biz/images/favicon.webp" alt="Logo" class="logo">
270 <h1 class="greeting" id="greeting-text">Hello, ${sanitizedName}!</h1>
271 <p style="color: var(--text-secondary);">Welcome to this Val Town powered website.</p>

NowPlayingGrabbermain.tsx8 matches

@alexvb•Updated 2 days ago
39 if (response.status > 400) {
40 const shortenedName = "Error (Forbidden)";
41 const image = "/assets/spotify.svg";
42 return { shortenedName, image };
43 } else if (response.status === 204) {
44 const shortenedName = "Currently Not Playing";
45 const image = "/assets/spotify.svg";
46 return { shortenedName, image };
47 }
48
49 const song = await response.json();
50 const image = song.item.album.images[0].url;
51 const artistNames = song.item.artists.map(a => a.name);
52 const link = song.item.external_urls.spotify;
65 formattedArtist,
66 artistLink,
67 image,
68 };
69 } catch (error) {
70 const shortenedName = "Error";
71 const image = "/assets/spotify.svg";
72 return { shortenedName, image };
73 }
74};

Parse-my-PDF-01main.tsx1 match

@aibotcommander•Updated 2 days ago
32 send("text", {
33 text:
34 "Failed to extract text from PDF. The file may be corrupted or image-based.",
35 });
36 send("done", {});

html-siteindex.html4 matches

@nbbaier•Updated 2 days ago
31 />
32 <meta property="og:site_name" content="into.md" />
33 <meta property="og:image" content="https://into.md/og-image.png" />
34
35 <!-- Twitter -->
36 <meta name="twitter:card" content="summary_large_image" />
37 <meta name="twitter:url" content="https://into.md/" />
38 <meta
44 content="Convert any webpage to clean markdown format. Prefix any URL with into.md/ for instant conversion."
45 />
46 <meta name="twitter:image" content="https://into.md/og-image.png" />
47
48 <link rel="icon" href="/favicon.ico" />
194
195 .link-underline {
196 background-image: linear-gradient(currentColor, currentColor);
197 background-position: 0 100%;
198 background-repeat: no-repeat;

Gemini-Nano-Bananamain.tsx23 matches

@aibotcommander•Updated 2 days ago
1// deno-lint-ignore no-unused-vars
2async function handleImageGeneration(
3 { prompt, send }: { prompt: string; send: SendEventFn },
4) {
5 try {
6 send("text", { text: "🎨 Generating image..." });
7
8 // Validate inputs
29 parts: [
30 {
31 text: `Generate an image: ${prompt}`,
32 },
33 ],
35 ],
36 generationConfig: {
37 responseModalities: ["TEXT", "IMAGE"],
38 temperature: 0.7,
39 maxOutputTokens: 2048,
59
60 console.error(
61 `Image generation failed: ${response.status} - ${errorText}`,
62 );
63
75
76 send("error", {
77 text: `Failed to generate image: ${errorMessage}`,
78 allow_retry: true,
79 });
103 send("error", {
104 text:
105 "Image generation was blocked due to safety filters. Try rephrasing your prompt to avoid potentially harmful content.",
106 allow_retry: true,
107 });
136 }
137
138 let hasImage = false;
139 let hasText = false;
140
145 hasText = true;
146 } else if (part.inlineData?.data) {
147 // Handle base64 image data
148 const imageData = part.inlineData.data;
149 const mimeType = part.inlineData.mimeType || "image/png";
150
151 // Validate base64 data more thoroughly
152 if (
153 !imageData || typeof imageData !== "string" || imageData.length === 0
154 ) {
155 console.error("Invalid image data:", part.inlineData);
156 continue;
157 }
160 try {
161 // Check if it's valid base64
162 atob(imageData);
163 } catch (base64Error) {
164 console.error("Invalid base64 image data:", base64Error);
165 continue;
166 }
168 send("text", {
169 text:
170 `![Generated Image](data:${mimeType};base64,${imageData})\n\nImage generated successfully!`,
171 });
172 hasImage = true;
173 }
174 }
175
176 // Provide feedback based on what was received
177 if (!hasImage && !hasText) {
178 send("error", {
179 text:
181 allow_retry: true,
182 });
183 } else if (!hasImage && hasText) {
184 send("text", {
185 text:
186 "Note: Only text was generated, no image was produced. You may want to try a different prompt.",
187 });
188 }
189 } catch (error) {
190 console.error("Image generation error:", error);
191
192 // More specific error messages based on error type
193 let errorMessage = "Image generation failed";
194
195 if (error instanceof TypeError) {
206 errorMessage = "Request was cancelled or timed out - please try again";
207 } else if (error.message) {
208 errorMessage = `Image generation failed: ${error.message}`;
209 }
210

ImageThing

@refactorized•Updated 2 days ago

Gemini-Image-Banana-012 file matches

@aibotcommander•Updated 3 days ago
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