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/$%7BsvgDataUrl%7D?q=image&page=10&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 9932 results for "image"(2890ms)

Townie2.cursorrules2 matches

@charmaine•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

Townie2ChatRouteSingleColumn.tsx15 matches

@charmaine•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}

tanstackReactHonoExampleindex.html1 match

@laurynas•Updated 2 days ago
6 <title>React Hono Val Town Starter</title>
7 <script src="https://cdn.tailwindcss.com"></script>
8 <link rel="icon" href="/public/favicon.svg" sizes="any" type="image/svg+xml">
9 </head>
10 <body class="bg-gray-100 font-sans">

tanstackReactHonoExampleREADME.md1 match

@laurynas•Updated 2 days ago
3It's common to have code and types that are needed on both the frontend and the backend. It's important that you write this code in a particularly defensive way because it's limited by what both environments support:
4
5![shapes at 25-02-25 11.57.13.png](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/75db1d51-d9b3-45e0-d178-25d886c10700/public)
6
7For example, you *cannot* use the `Deno` keyword. For imports, you can't use `npm:` specifiers, so we reccomend `https://esm.sh` because it works on the server & client. You *can* use TypeScript because that is transpiled in `/backend/index.ts` for the frontend. Most code that works on the frontend tends to work in Deno, because Deno is designed to support "web-standards", but there are definitely edge cases to look out for.

tanstackReactHonoExampleREADME.md1 match

@laurynas•Updated 2 days ago
21## `favicon.svg`
22
23As of this writing Val Town only supports text files, which is why the favicon is an SVG and not an .ico or any other binary image format. If you need binary file storage, check out [Blob Storage](https://docs.val.town/std/blob/).
24
25## `components/`

SethGodinNewBlogPostNotifierREADME.md1 match

@lanly•Updated 2 days ago
1# New Blog Post - Email Notifier
2Want to follow a blog but don't use RSS feeds? Try this val, originally [created by saltcod](https://www.val.town/x/saltcod/SethGodinBlogEmail)!
3![Screenshot 2025-06-06 at 11.52.15 AM.png](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/90bf066e-695e-40ea-6fbc-43fe53c31000/public)
4
5## Usage instructions

log-media-request-headersimage.tsx0 matches

@eeeps•Updated 2 days ago

thehost-mapboxscript.js21 matches

@ncf•Updated 2 days ago
20 map.on("load", function() {
21 // Ajout de l'icône custom PNG blanc (hébergée sur Webflow, doit être blanc pur sur fond transparent)
22 map.loadImage(
23 "https://cdn.prod.website-files.com/680b45cea1d474e42a333f71/6849450d1f21ddfdce96b8bd_Vector.png",
24 (error, image) => {
25 if (error) throw error;
26 if (!map.hasImage("custom-marker")) {
27 map.addImage("custom-marker", image, { sdf: true });
28 }
29
80 mapLocations.features = [];
81 locationItems.forEach((item, idx) => {
82 // Récupère l'URL de l'image principale de la card
83 let image = item.getAttribute("data-image");
84 if (!image) {
85 const imgEl = item.querySelector(".image-card-results");
86 if (imgEl) {
87 image = imgEl.getAttribute("src");
88 }
89 }
90 if (!image) {
91 image = "https://uploads-ssl.webflow.com/placeholder.jpg";
92 }
93 const lat = parseFloat(item.getAttribute("data-lat"));
110 name: name,
111 city: city,
112 image: image,
113 description: description,
114 url: url,
158 <div id="popup-close-btn-${feature.id}" class="popup-close-btn"></div>
159 <div class="popup-content-inner">
160 <div class="popup-image">
161 <img src="${feature.properties.image}" loading="lazy" alt="${feature.properties.name}" class="popup-image">
162 </div>
163 <div class="popup-title">${feature.properties.name}</div>
277 const newFeatures = [];
278 visibleItems.forEach((item, idx) => {
279 let image = item.getAttribute("data-image");
280 if (!image) {
281 const imgEl = item.querySelector(".image-card-results");
282 if (imgEl) {
283 image = imgEl.getAttribute("src");
284 }
285 }
286 if (!image) {
287 image = "https://uploads-ssl.webflow.com/placeholder.jpg"; // Mets ici l'URL de ton image par défaut
288 }
289 const lat = parseFloat(item.getAttribute("data-lat"));
310 name: name,
311 city: city,
312 image: image,
313 description: description,
314 url: url,

html2svgmain.tsx13 matches

@g•Updated 2 days ago
3 * It uses a textarea for HTML input and a button to trigger the conversion.
4 * To calculate the required SVG dimensions, it renders the input HTML into an off-screen div and measures its bounding box.
5 * The resulting SVG, containing the HTML in a <foreignObject>, is then displayed in four formats: raw SVG code, an SVG data URL, an HTML <img> tag, and a Markdown image link.
6 */
7import { serve } from "https://esm.town/v/g/serveUtils";
39
40 <div class="output-group">
41 <label>3. HTML Image Preview</label>
42 <div id="outputImageContainer"></div>
43 <label for="outputImageCode">HTML <code><img></code> Code</label>
44 <textarea id="outputImageCode" readonly rows="3"></textarea>
45 </div>
46
127 margin-bottom: 8px;
128 }
129 #outputImageContainer {
130 padding: 15px;
131 border: 1px dashed #ccc;
148 const outputSvgCode = document.getElementById("outputSvgCode");
149 const outputDataUrl = document.getElementById("outputDataUrl");
150 const outputImageContainer = document.getElementById("outputImageContainer");
151 const outputImageCode = document.getElementById("outputImageCode");
152 const outputMarkdown = document.getElementById("outputMarkdown");
153
190
191 // 3. Create the various output formats
192 const svgDataUrl = `data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(svgString)))}`;
193 const htmlImgTag = `<img src="${svgDataUrl}" alt="Generated from HTML" width="${width}" height="${height}">`;
194 const markdown = `![Generated Image](${svgDataUrl})`;
195
196 // 4. Display the outputs
200 outputDataUrl.value = svgDataUrl;
201
202 outputImageContainer.innerHTML = htmlImgTag;
203 outputImageCode.value = htmlImgTag;
204
205 outputMarkdown.value = markdown;
206 });
207
208 [outputSvgCode, outputDataUrl, outputImageCode, outputMarkdown].forEach(textarea => {
209 textarea.addEventListener('click', () => {
210 textarea.select();

basic-html-starterindex.html1 match

@ianyang•Updated 2 days 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 -->

girocode2 file matches

@fxfr•Updated 10 hours ago
Returns EPC QR codes (aka GiroCode) as images
compare-images

compare-images2 file matches

@eeeps•Updated 3 days ago
Compare two images and show some metadata about ’em
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