Sometimes you just need a placeholder image right at your finger tips. Just enter the width + x + height at the end of this URL and off you go!
Example: nosrc.net/100x100 or nosrc.net/100 creates
<cfscript>
url.height = max(min(url.height, 1024), 1);
url.width = max(min(url.width, 1024), 1);
label = "#url.width#x#url.height#";
imageFolder = expandPath("./images/#url.width#");
imagePath = "#imageFolder#/#url.height#.png";
if (!fileExists(imagePath)) {
if (!directoryExists(imageFolder)) {
directoryCreate(imageFolder);
}
newImg = imageNew("", url.width, url.height, "GRAYSCALE", "cccccc");
imageSetDrawingColor(newImg, "333333");
imageDrawText(newImg, "#label#", 4, 16, { size=14, style="bold" });
imageWrite(newImg, imagePath, 0, "true");
}
getPageContext().forward( "images/#url.width#/#url.height#.png" );;;
</cfscript>