Skip to content
DevMeme
3825 of 7435
When a Designer's SVG is a PNG in a Trench Coat
Frontend Post #4167, on Feb 5, 2022 in TG

When a Designer's SVG is a PNG in a Trench Coat

Why is this Frontend meme funny?

Level 1: Not What It Seems

Imagine you ask for a special picture that can be blown up big or kept small without losing any detail – like a coloring book drawing that you can resize and recolor easily. Your friend hands you an envelope labeled “Magic Outline Drawing” (you’re excited because that’s exactly what you need!). But when you open it up, you find a small photograph glued inside the outline of a paper. You try to zoom in on the photo, but it just gets blurry, and you can’t really recolor it because it’s already printed. You feel confused and a bit cheated: this wasn’t the deal! It’s not the flexible outline drawing you were promised, it’s just a regular picture hiding in fancy packaging. In the meme, the developer feels the same way – they were promised a type of image that should be easy to work with and super clear at any size, but they got a sneaky hidden picture instead. No wonder the developer is frowning! The whole joke is that things aren’t always what they seem, and getting something disguised as something else can be really frustrating, just like getting a photo when you expected a nice clean drawing.

Level 2: Raster in Disguise

Let’s break down what’s happening in simpler terms. We have two main image formats at play: SVG and PNG. SVG (Scalable Vector Graphics) is a format where images are defined by shapes, lines, and curves through code (imagine describing a drawing by instructing “draw a circle of radius 50 at these coordinates”). Because it’s code-based, an SVG image can be scaled to any size without losing clarity – it stays sharp no matter how big or small you make it. It’s great for things like icons, logos, or illustrations with solid colors and clear shapes. Also, SVG files are usually light and clean, basically a text file containing XML markup (tags like <svg>, <rect>, <circle>, <path> etc.). Developers love SVGs because they’re easy to edit (you can open them in a text editor), style with CSS, and they generally load quickly due to their small size.

On the other hand, PNG is a raster image format. Raster means the image is made of pixels – tiny colored squares. If you zoom in or enlarge a PNG, it can get blurry or pixelated, because the computer is just stretching those pixels. PNGs are great for photographs or detailed images, and they support transparency. But they don’t scale up nicely (you’d need a larger file for higher resolution), and their file size can be much larger than an equivalent vector graphic, especially for high detail or big dimensions. PNG data isn’t readable by humans – it’s essentially binary data (lots of 0s and 1s representing pixel colors) often compressed to save space.

Now, Base64 encoding is a technique to take binary data (like that PNG image’s contents) and encode it into text characters. It uses a set of 64 characters (letters, numbers, +, and /) to represent the data. This is often used to embed images or files directly into other text-based files. Why would someone do that? One common use is the data URI scheme. A data URI is like a URL, but instead of pointing to a file on the internet, it contains the actual file data right there in the URL. It usually starts with something like "data:image/png;base64,... followed by a long stream of characters. For example, a tiny red dot PNG image might look like:

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB...etc" alt="dot" />

All those random-looking letters and numbers after base64, are the PNG file’s content, just encoded in text form. It’s convenient for embedding small images directly into HTML or CSS files so you don’t have to manage a separate file. However, it makes things bigger (remember, Base64 text is about 33% larger than the binary data) and hard to read.

In the meme comic, the designer hands the developer what’s labeled as an “SVG.” The developer expects a nice small .svg file with vector instructions. Instead, when the developer opens it (represented by unfolding the paper), they see something like:

<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">
  <image xlink:href="data:image/png;base64,iVBO...LOTSMORECODE...==" 
         width="200" height="200" />
</svg>

(The string after base64, would actually be extremely long – the meme shows it sprawling across the page diagonally, indicating it just keeps going.)

This code means the SVG file isn’t drawing any shapes itself; it’s just including an <image> element. That <image> tag is basically saying “hey, take this PNG data and display it inside the SVG canvas.” The xlink:href attribute (or sometimes just href in modern SVG) is how the SVG references an image. Instead of linking to an external .png file, it has data:image/png;base64,... which inlines the image. So the SVG is secretly just a wrapper around a PNG image. It’s like the SVG is a delivery vehicle carrying a PNG hidden inside.

For a junior developer or someone new to front-end, why is this a problem? A few reasons:

  • File Size: One big reason to use SVGs is to keep file size down. A simple icon as an SVG might be only a few KB (because it’s code instructions). The same icon as a PNG image could be tens or hundreds of KB if it’s high resolution. When you embed a PNG inside an SVG via Base64, you usually increase the size further (the PNG data gets about one-third larger when converted to Base64 text). So you end up with a much larger file to send over the web. This is bad for website performance – users have to download more data, which can make pages load slower.

  • Scalability & Quality: SVGs are supposed to scale perfectly. But if your SVG just contains a PNG, then scaling that “SVG” up will actually scale the PNG image inside it. If the PNG isn’t high enough resolution for the new size, it will look blurry or pixelated. So the “SVG” no longer behaves like a true vector. It’s not really scalable graphics anymore. The developer in the meme is upset because what was promised to be an infinitely scalable graphic is in fact only as good as the resolution of the embedded PNG.

  • Editability and Styling: Developers often manipulate SVGs — change colors, add CSS classes, animate parts of it — because the SVG’s XML elements (like <path> or <circle>) can be targeted or edited. In our case, there are no shapes or paths to edit at all, just one giant <image> element. You can’t easily tweak the color of that image via code (since it’s baked into the PNG), and you can’t, say, change a part of the shape or add a hover effect on different SVG sub-elements. It’s like a black box. If the designer later says “Can we make that icon a bit lighter?” the developer can’t just adjust a fill color in the SVG code – they might have to go back to the designer for a new asset. That’s frustrating.

  • Code Quality and Readability: Normally, an SVG file might contain nicely formatted, readable XML. For example:

    <!-- Ideal SVG content -->
    <svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
      <circle cx="50" cy="50" r="40" fill="blue" />
    </svg>
    

    The above is easy to understand: it draws a blue circle. But with an embedded PNG, the content becomes an enormous string of seemingly random characters. That’s impossible to read or diff. In code reviews or version control, a diff on that file is meaningless noise. It’s easy for bugs or issues to hide in there. For instance, if the designer updated the image, the Base64 string would change entirely, and you’d have no clue what changed by just looking at the code. It could also accidentally carry metadata or large color profiles increasing size, and you wouldn’t know without decoding it. In short, it’s messy. Developers value code quality, and this feels like someone dropped an opaque blob of data into an otherwise clean codebase.

  • Asset Pipeline and Optimization: Typically, projects have a build pipeline to optimize assets. For real SVGs, we might run tools to remove unnecessary metadata, combine paths, etc. For PNGs, we use compressors to reduce file size. When a PNG is hidden in an SVG, those optimizations might not happen. The SVG optimizer might ignore the content of <image> or at best it can only gzip the entire thing. The PNG data might escape any compression that a normal PNG file would get, resulting in lower overall optimization. This could slip through testing if nobody notices the file size or performance impact. It’s one of those asset pipeline woes that junior devs learn about when things mysteriously load slowly and they have to investigate where the bloat comes from.

The meme’s two panels illustrate this as a kind of practical joke (though unintentional in real life). In panel 1, the designer cheerfully hands over what is labeled as “SVG” – implying “here’s the vector file you wanted!” The developer is happy and trusting at that moment, because SVGs are usually good news in front-end development. In panel 2, the close-up reveals the developer’s face twisted in anger as they read the actual content. The little paper that said “SVG” now clearly contains a snippet of code starting with <svg><image xlink:href="data:image/png;base64,iR... followed by a massive Base64 string. The artist drew it diagonally and spilling off the page to show how it’s just an overwhelming amount of junk data from the dev’s point of view. This 1:1 maps to the feeling a developer gets when they open what should be a tidy SVG file and instead see a single line of gibberish hundreds of characters long. The developer in the comic is basically thinking: “This isn’t an SVG at all… it’s a wolf in sheep’s clothing!” (or as our title says, a raster in disguise).

For someone newer to the field, it might be surprising that this happens. You’d think if you ask for an SVG, you get a true vector. But when working with teams, especially in designer-developer handoff situations, misunderstandings or tool quirks can lead to this exact scenario. Maybe the designer just didn’t realize that exporting that way embedded an image. Or maybe they copied a part of an image into their design and the easiest way to output was to embed it. The result is the developer’s head-scratching moment. It’s a classic Developer Pain Point in Frontend work because it usually falls on the developer to fix it. They might have to go back and say, “Could you send me an actual SVG (vector) version of this graphic?” or they might themselves try to extract the PNG, use it directly, or re-create the vector if possible. None of these are tasks the developer anticipated – they thought they’d just drop in an SVG and move on. So it disrupts their workflow.

This scenario is also frequently shared as frontend humor because nearly every web developer has encountered some form of this “not what I expected” asset issue. It teaches the importance of checking what’s inside your files and communicating with the design team. If you’re a junior dev, don’t feel bad if this has happened to you – even seniors get caught by it occasionally. The key takeaway is understanding the difference between vector vs raster and why using the right format matters. It’s the difference between getting a true scalable icon versus an image that might slow down your site or look bad on certain screens.

To summarize the expectations vs reality here, let’s compare what the developer thought they were getting with what they actually got:

Developer Expected (Real SVG) Developer Got (PNG-in-SVG)
A small file with XML code drawing shapes. A large file with one big Base64 text blob.
Scalable image that stays sharp at any size. Pixel-based image that can blur when scaled up.
Easy to tweak colors or shapes via code. Hard to edit – it’s basically a locked picture in code.
Clean code (paths, circles, etc.) that is human-readable. Messy code – an unreadable string of characters no one can manually parse.
Separate image file could be optimized or cached. Image data embedded, so it’s always loaded fully inline, harder to optimize.
Improves performance (small and vector). Might hurt performance (larger than it needs to be, more memory to decode).

Seeing it side by side, it’s clear why the developer is upset. The fake SVG delivered none of the benefits it promised. Instead, it’s actually worse than just getting a normal PNG file, because at least with a PNG the developer knows what they have. With the disguised approach, they first have to discover the deception, and then clean up the mess.

In the end, this meme is a lighthearted warning. For juniors, it’s a hint: always double-check those “SVG” assets – crack them open in a code editor or an SVG viewer. If you see <image xlink:href="data:image/png;base64,...">, you know you’ve got a sneaky PNG inside and not real vector data. You’ll then understand why your SVG file is huge or why it’s not scaling nicely. It’s a learning moment about code quality too: just because something is given to you in a certain format doesn’t mean it’s adhering to best practices. Sometimes, part of being a developer is verifying and optimizing assets, not just code. And when things like this happen, you’re allowed to be a bit frustrated – then you fix it and maybe share a laugh about “that time I got a bogus SVG” with your colleagues later.

Level 3: Base64 Trojan Horse

At first glance, an SVG handoff is every front-end developer’s dream: a crisp, infinitely scalable graphic defined by code. But in this meme’s scenario, that dream hides a nightmare. The designer passes over a file labeled "SVG", and our developer eagerly reaches out, expecting a clean vector asset. Instead, panel 2 reveals the ugly truth on the unfolded paper: an <svg> file stuffed with a Base64-encoded PNG image via a data URI. In other words, a Trojan horse of pixels has snuck into what was supposed to be a vector file. The developer’s furious expression says it all – this is coding frustration at a very relatable level.

Why is this funny (or rather, painfully funny) to experienced devs? It’s the absurdity of subverting the entire point of an SVG. SVG (Scalable Vector Graphics) is a vector format, meaning it uses shapes, lines, and curves described in XML text. Vectors are resolution-independent and light-weight; you can scale them up without blurriness, and their file size is typically small since they’re just math and coordinates under the hood. Here, however, the SVG has been misused as a mere container for a raster image. The meme exaggerates the Base64 string sprawling diagonally across the page to show how bloated and unreadable that code is. It’s like opening what you think is a slim novel of clean code and finding it filled with an indecipherable stream of characters. The developer expected an elegant <path d="..."/> or <circle> commands describing shapes, but got a data URI monstrosity: <image xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUh..."> (and so on, for what feels like infinity). This visual gag nails a real frontend pain point – the betrayal of finding a fake SVG.

From a senior developer perspective, this scenario triggers war stories of past projects. Perhaps you’ve encountered a commit where a so-called SVG file was several hundred kilobytes, prompting a “What on earth is in there?” moment. Upon opening it, you see that long Base64 payload – the image’s binary data awkwardly represented as text. This is a classic case of data format misuse. Instead of sending a true vector graphic, someone (often unintentionally) embedded a raster asset in an SVG wrapper. It’s essentially a PNG in disguise, and it defeats all the advantages of using SVG in the first place. The humor comes with a side of exasperation: we share a collective “ugh, not again” because this is a well-known anti-pattern in developer experience (DX).

Why does this happen? One culprit is design export tools. A designer might use Illustrator, Sketch, or Figma and export to SVG without realizing there’s a raster element in their design (for instance, a photo or a complex effect they applied). The export tool wants to preserve appearance at all costs, so it embeds the bitmap image inside the SVG as a Base64-encoded <image> tag. Technically, it works – the image will display correctly – but it’s a sneaky workaround. It’s a bit like a lazy shortcut: instead of converting everything to vector shapes, the tool just wraps the bitmap. The designer, seeing a file ending in .svg, assumes they’ve done their job. Meanwhile, the developer opens it expecting clean, scalable vector vs raster goodness and instead finds a wall of encoded binary gibberish. Surprise! It’s a designer-developer handoff fiasco.

This juxtaposition of expectations vs reality is the crux of the meme. The developer’s anger in the second panel is something many of us have felt. It’s the “you had one job!” feeling. We rely on SVGs for small file size and code quality (since SVG XML can be minified, gzipped, even manually edited or animated). But a data URI PNG payload breaks those expectations: the file size balloons (Base64 encoding typically adds ~33% overhead in size, so a 100KB PNG becomes ~133KB of text, not to mention it’s all embedded in an XML structure). Performance can suffer because you can’t leverage separate image caching or specialized compression as easily. And good luck diffing that in version control or code reviews – a Base64 string is essentially opaque. The meme hits on that developer pain point: receiving something that’s technically an SVG file, but functionally it might as well be a regular image, only now it’s harder to deal with.

From an architecture and asset pipeline perspective, this is also problematic. Many asset pipelines have different optimization steps for SVGs versus raster images. For example, your build might run an SVG optimizer (like SVGO) to clean up SVG XML, and run separate compression (like pngquant or mozjpeg) for bitmap images. If a PNG is camouflaged inside an SVG, it can slip through optimizers – the SVG optimizer might not touch the embedded image data, and the PNG compressor won’t see it at all because it’s hidden in text form. The result is a heavy asset in production that no one caught. In worst cases, this can affect page load times or memory usage in a web app (since the entire image must be decoded from Base64 in the browser). It’s an asset pipeline woe that might only be discovered during a performance audit or when a user with a slow connection complains.

The humor also touches on developer experience and team workflow. Ideally, designers and developers collaborate so that assets are provided in the optimal format. An experienced team might have guidelines like “No raster images embedded in SVGs” or at least communication: if something can’t be pure SVG, maybe provide both the SVG (for structure) and an actual image or let the dev know. When that process fails, you get these little landmines in the project. It’s funny because it’s true – many devs have had to gently tell a designer, “Hey, that SVG you gave me... it’s actually just a PNG in disguise. Could we get an actual vector?” Sometimes the designer is surprised: “Wait, isn’t it an SVG? My tool said export as SVG.” This underscores a knowledge gap or tooling issue, not malice. But the frustration lands squarely on the developer who discovers the issue at the worst time – often when implementing or optimizing late in the game.

In terms of shared trauma and inside jokes, this meme resonates because it highlights the frontend humor of daily work: things that should be simple often turn into unexpected debugging sessions. It’s the same energy as the classic “It works on my machine” or “It’s always DNS” jokes – here it’s “Check if that SVG is truly an SVG.” It pokes fun at the notion that even something as straightforward as an image asset can hide gotchas. Seasoned devs might chuckle remembering a time they opened an .svg only to see base64 code spilling out like the Matrix, exactly as depicted. The code cleanliness aspect is tongue-in-cheek too: we pride ourselves on clean, maintainable code, and then one innocent asset drops a blob of entropy into our codebase. The meme’s absurd classroom setting – a designer slyly handing off a small paper that says SVG – captures that feeling of a sneak attack. The developer’s glare in panel 2 could be any of us realizing we’ve been handed a fake SVG and now have to refactor or request fixes.

Ultimately, this comedic scenario underscores a real lesson in data formats and team communication. It invites us to laugh at the absurdity while remembering: always inspect your SVGs! In the battle of vector vs raster, always trust but verify. As an experienced dev might quip, “SVG may stand for Scalable Vector Graphics, but in this case it was more like Sneaky Vector Gotcha.” The only thing that scaled here was our frustration. 😅

Description

A two-panel comic strip illustrating a common friction point between designers and developers. In the top panel, two cartoon figures are in a classroom setting. The one labeled 'Designer' passes a small, neat note labeled 'SVG' to the one labeled 'Developer'. In the bottom panel, the 'Developer' figure has an angry, scowling expression as they look at the unfolded note. The note reveals the content of the SVG file, which is not clean vector code but an '<image>' tag with its 'xlink:href' attribute set to a massive 'data:image/png;base64,...' string, indicating a raster image has been embedded within the SVG wrapper. The humor stems from the developer's frustration at receiving a file that is technically an SVG but completely defeats the format's purpose - being scalable, lightweight, and editable via code - by containing a non-vector, base64-encoded bitmap image. It's a classic case of a technically correct but practically useless asset handoff

Comments

21
Anonymous ★ Top Pick That's not an SVG, that's a PNG that went through witness protection and came out with a new file extension and a bloated, uneditable identity
  1. Anonymous ★ Top Pick

    That's not an SVG, that's a PNG that went through witness protection and came out with a new file extension and a bloated, uneditable identity

  2. Anonymous

    PR diff: icon.svg +6 MB, 9 000 lines of base64 - turns out “scalable vector” just means the designer found a way to auto-scale our CDN bill

  3. Anonymous

    After 20 years in the industry, I've learned that 'It's just an SVG' is the design equivalent of 'It's just a simple form' - both translate to 'Here's 10KB of XML that will somehow break IE11, require three polyfills, and make your bundler cry.'

  4. Anonymous

    It's vector all the way down - until you open the file and find a base64 PNG cosplaying as an SVG. Infinitely scalable, as long as you only scale to exactly 100%

  5. Anonymous

    Nothing says 'collaborative workflow' quite like receiving an SVG that's been through an industrial minifier with embedded base64 PNGs. At least they didn't export it from Illustrator with 47 empty groups and absolute positioning

  6. Anonymous

    Every time a designer exports an “SVG” that’s a base64 <image>, a frontend lead writes a new CI rule to fail PRs on bundle size

  7. Anonymous

    Designers export SVGs with tree-shaking dreams shattered by 10k nested <clipPath>s - proof that pixel-perfect fidelity is the frontend's original sin

  8. Anonymous

    An SVG that’s actually a base64 PNG is the frontend equivalent of microservices sharing a database: technically correct, architecturally a cry for help

  9. @janeoa 4y

    АХАХАХАХАХАХАХАХАХАХА

  10. @lovetraindriver 4y

    I’ve seen some websites using svg instead of regular images. And read about that improves loading. Does that really improves it? What are advantages of this approach? Maybe someone here knows?

    1. D Y 4y

      It depends on image. Do you know what vector and rastr images are? Svg could be scaled as you want without losses. And relatively simple images on svg will take significantly less memory then the same jpg when you need to store info for each pixel.

      1. @lovetraindriver 4y

        Yes, I know the difference. Website which I was talking about uses svg raster image for banners. Image size is about 8000px width, so I was really surprised with this. I guess, I should compare file sizes of it. Thank you for the answer! Have a nice day. :)

        1. @RiedleroD 4y

          example for good use of SVGs: my website. I got lots of very small icons that should also look good on larger screens: https://riedler.wien/music/ Also the icons get displayed much larger when you click on a song.

    2. @QutePoet 4y

      Yes but it depends on pictures details. Pictograms are x 1,5 — x 3 smaller and adaptive to any resolution. If you have much pictograms, you can even concatenate them into single SVG to load as one file. As for big pictures you need to compare. Too detailed vector graphics with much effects are heavy for CPU. You need to mention it when it comes to banners. And there is no open standard for SVG animation which is supported by most browsers. The best way to animate objects on website is to use JS library (there are lots of them, choose the one you like). The best way to animate background is to use GLSL shader. You can use tree.js to show them as background. If there are not much calculations on the shader, it's also light enough for GPU (even from the year 2010). All modern browsers can run shaders. Smartphone (but not potato one) can run shader but be careful with resolution, don't make it too big. If you don't know anything about GLSL, you can check lots of them on https://glslsandbox.com/ Check various pages, they are heavily different. Shader can look like a new world if the creator used his potential maximally.

      1. @lovetraindriver 4y

        Whoa. Thanks for info! I think it's a bit early for me to getting in GLSL Shaders. But, I hope to get them in future. Added to my todo list. :)

        1. @QutePoet 4y

          You can use AutoCAD to create your shader and then convert it to GLSL using https://github.com/haplokuon/netDxf and C#

      2. @Iyhciyhc 4y

        This is the best message I ever saw since I join this group. I will give as many stars as possuble if I could !

  11. @callofvoid0 4y

    what if we decode its base64? does it give us a human-readable script ? or pixel data ?

    1. @slnt_opp 4y

      Yes, that'd be raw PNG bytes Common way

      1. @callofvoid0 4y

        ah thanks

  12. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

    Lmao

Use J and K for navigation