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/?q=image&page=413&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 7763 results for "image"(855ms)

blog-vt2EXAMPLE.md2 matches

@jxnblk•Updated 1 month ago
40- Item 3
41
42### Images
43
44Images can be included using markdown syntax.
45
46## Conclusion

blogHead.tsx4 matches

@jxnblk•Updated 1 month ago
17 <meta charSet="UTF-8" />
18 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19 <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
20
21 <title>{title}</title>
28 <meta property="og:description" content={description} />
29 {/*
30 <meta property="og:image" content={socialImage} />
31 */}
32
33 {/* Twitter */}
34 <meta property="twitter:card" content="summary_large_image" />
35 <meta property="twitter:url" content={BLOG_URL} />
36 <meta property="twitter:title" content={title} />
37 <meta property="twitter:description" content={description} />
38 {/*
39 <meta property="twitter:image" content={socialImage} />
40 */}
41

blogfavicon.svg.ts1 match

@jxnblk•Updated 1 month ago
13 {
14 headers: {
15 "Content-Type": "image/svg+xml",
16 },
17 },

blogIMAGES.md3 matches

@valdottown•Updated 1 month ago
1Eventually we should host all our images properly, but for now, drag and drop them here 👇
2
3* https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/4d90a6f7-247c-4df4-3de6-928364e10000/public
4* https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/f175100b-a190-4772-7056-04c09f273a00/public

spagindex.html30 matches

@todepond•Updated 1 month ago
17 <br />
18
19 Replace <code>name</code> with the name you gave the image.
20 </p>
21
99 <audio controls style="display: none" id="preview-audio"></audio>
100 </div>
101 <input type="file" id="file" accept="audio/*, image/*" required />
102 </label>
103 <label for="singing">
138 const nameInput = document.getElementById("name");
139 const fileInput = document.getElementById("file");
140 const previewImage = document.getElementById("preview");
141 const previewAudio = document.getElementById("preview-audio");
142 const uploadButton = document.getElementById("upload-button");
153 reader.onload = () => {
154 const dataUrl = reader.result;
155 previewImage.src = dataUrl; // the form just grabs whatever is here and uploads this, which may even be audio
156 previewAudio.src = dataUrl;
157 };
166 });
167
168 previewImage.addEventListener("load", () => {
169 previewImage.style.display = "block";
170 });
171
174 });
175
176 previewImage.addEventListener("error", () => {
177 previewImage.style.display = "none";
178 });
179
226 event.preventDefault();
227 const name = encodeURIComponent(nameInput.value);
228 const dataUrl = previewImage.src;
229 const body = JSON.stringify({ name, dataUrl });
230 uploadButton.disabled = true;
238 nameInput.value = "";
239 fileInput.value = "";
240 previewImage.src = "";
241 previewAudio.src = "";
242 } else {
320
321 const contentType = response.headers.get("content-type");
322 if (contentType.startsWith("image")) {
323 const imageElement = document.createElement("img");
324 imageElement.loading = "lazy";
325 imageElement.style.width = "100%";
326 imageElement.style.objectFit = "contain";
327 imageElement.style.height = "300px";
328 // src the response
329 const blob = await response.blob();
330 imageElement.src = URL.createObjectURL(blob);
331 imageElement.onerror = () => {
332 imageElement.remove();
333 };
334 previewContainer.appendChild(imageElement);
335 } else if (contentType.startsWith("audio")) {
336 const audioElement = document.createElement("audio");
368 });
369
370 // const imageElement = document.createElement("img");
371 // imageElement.loading = "lazy";
372 // imageElement.src = `https://tode.party?${upload.name}`;
373 // imageElement.style.width = "100%";
374 // imageElement.style.objectFit = "contain";
375 // imageElement.style.border = "1px solid rgb(159, 174, 238)";
376 // imageElement.style.backgroundColor = "rgb(55, 67, 98)";
377 // imageElement.style.height = "300px";
378 // imageElement.onerror = () => {
379 // imageElement.remove();
380 // };
381

blob_adminREADME.md1 match

@strickinato•Updated 1 month ago
3This is a lightweight Blob Admin interface to view and debug your Blob data.
4
5![Screenshot 2024-11-22 at 15.43.43@2x.png](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/d075a4ee-93ec-4cdd-4823-7c8aee593f00/public)
6
7Versions 0-17 of this val were done with Hono and server-rendering.

blob_adminmain.tsx5 matches

@strickinato•Updated 1 month ago
440 {profile && (
441 <div className="flex items-center space-x-4">
442 <img src={profile.profileImageUrl} alt="Profile" className="w-8 h-8 rounded-full" />
443 <span>{profile.username}</span>
444 <a href="/auth/logout" className="text-blue-400 hover:text-blue-300">Logout</a>
583 alt="Blob content"
584 className="max-w-full h-auto"
585 onError={() => console.error("Error loading image")}
586 />
587 </div>
635 <li>Create public shareable links for blobs</li>
636 <li>View and manage public folder</li>
637 <li>Preview images directly in the interface</li>
638 </ul>
639 </div>
706 const { ValTown } = await import("npm:@valtown/sdk");
707 const vt = new ValTown();
708 const { email: authorEmail, profileImageUrl, username } = await vt.me.profile.retrieve();
709 // const authorEmail = me.email;
710
774
775 c.set("email", email);
776 c.set("profile", { profileImageUrl, username });
777 await next();
778};

Open-ToownieuseChatLogic.ts4 matches

@toowired•Updated 1 month ago
9 bearerToken: string;
10 selectedFiles: string[];
11 images: (string | null)[];
12 soundEnabled: boolean;
13}
19 bearerToken,
20 selectedFiles,
21 images,
22 soundEnabled,
23}: UseChatLogicProps) {
41 anthropicApiKey,
42 selectedFiles,
43 images: images
44 .filter((img): img is string => {
45 const isValid = typeof img === "string" && img.startsWith("data:");
46 if (!isValid && img !== null) {
47 console.warn("Invalid image format:", img?.substring(0, 50) + "...");
48 }
49 return isValid;

Open-ToownieTODOs.md1 match

@toowired•Updated 1 month ago
30 - [x] File write as a code embed
31 - [x] str_replace as a diff view
32- [x] make image drop area invisible and bigger
33- [x] Give it all the code (except maybe .txt files) as initial context (like cursor sonnet max)
34- [x] I seem to have lost the delete file tool and instructions, try to find them back in history or re-create?

Open-Toowniesystem_prompt.txt10 matches

@toowired•Updated 1 month ago
12- If a section of code that you're working on is getting too complex, consider refactoring it into subcomponents
13
14## Image Handling
15
16- When users upload images, carefully analyze them to understand their content
17- Reference specific details from the images in your responses
18- If multiple images are uploaded, consider their relationship to each other
19- For code-related images (screenshots, diagrams), extract relevant information and incorporate it into your solutions
20- For UI mockups or design images, use them as reference for layout and design, use the colors from the image
21- When images contain text or code, transcribe relevant portions as needed
22- If image content is unclear, ask clarifying questions about what the user wants you to focus on
23
24## Technical Requirements
95## Val Town Platform Specifics
96- **Redirects:** Use `return new Response(null, { status: 302, headers: { Location: "/place/to/redirect" }})` instead of `Response.redirect` which is broken
97- **Images:** Avoid external images or base64 images. Use emojis, unicode symbols, or icon fonts/libraries instead
98- For AI-generated images, use: `https://maxm-imggenurl.web.val.run/the-description-of-your-image`
99- **Storage:** DO NOT use the Deno KV module for storage
100- **Browser APIs:** DO NOT use the `alert()`, `prompt()`, or `confirm()` methods

ImageExplorer10 file matches

@carmi•Updated 3 days ago

Imagetourl2 file matches

@dcm31•Updated 6 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