Why an SVG border or stroke is clipped after image export

Check painted edges and export bounds before trying to restore missing detail with more pixels.

By Relwick · Published

The centre of a diagram looks correct, but part of its outer border disappears in the exported image. This can be a geometry or clipping problem rather than inadequate resolution.

A larger output cannot recover a region the rendering process was instructed to exclude.

Quick answer & key takeaways

A stroke, marker, or effect can extend beyond the artwork’s export area, and SVG clipping rules can hide that painted region. Increasing the PNG or JPG dimensions may only enlarge the same clipped view. Inspect the source SVG and its export bounds, correct the artwork or page in an appropriate editor, then rasterise again and compare all edges with the intended design.

  • Inspect the painted extent, not just the shape’s centre line.
  • Export bounds and clipping rules can remove edge content.
  • Correct the source before making a larger raster copy.

Find the first clipped version

Compare the editable artwork, its SVG export, and the final raster image. If the exported SVG already clips the border in a normal view, changing JPEG quality later is addressing the wrong stage.

Look at every outer edge, including arrowheads, rounded corners, and labels positioned close to the page boundary. A line’s mathematical path and the complete painted stroke do not necessarily occupy the same area.

Check bounds and clipping together

The SVG specification describes how viewport clipping depends on overflow and other clipping rules. The viewBox establishes a coordinate mapping; it should not be treated as a universal promise that every painted effect will be included in every embedding or export context.

Visible symptomSource-level inspection
Half of an outside border is missingCheck whether its stroke extends beyond the export area.
An arrow tip disappearsInspect marker extent and any local clipping.
Only one group is cut offReview that group’s clipping path or mask.
A shadow ends abruptlyCheck the effect’s bounds and export support.

These are diagnostic possibilities, not proof of one cause. An unsupported feature or a difference between renderers can also change the result. Compare a simple reproduction before editing complex artwork blindly.

Repair the source artwork

For artwork you can edit, use its vector editor to review the page or export-area bounds. Include the complete intended stroke or effect, and remove an accidental clipping restriction only when it is not part of the design.

Keep intentional cropping intact. A diagram may deliberately show an object crossing a boundary, while a logo may require a specific clear area. Compare against the approved design rather than adding arbitrary padding to every SVG.

If the SVG came from someone else and you cannot verify the intended edge, request a corrected source or a complete raster export. Do not redraw missing official marks or infer the end of a technical diagram from a clipped image.

Export and review the result

Image compressor accepts supported restricted SVG input and renders it before preparing the image. It does not offer a vector-artboard or clipping-path editor. Its later size controls should not be expected to repair content excluded during the initial render.

After fixing the source, compare the new output with the intended artwork at its final dimensions. Check all four edges and any nearby text. Then review format, transparency, and byte requirements separately.

Frequently asked questions

Will a higher resolution restore a clipped arrowhead?

Not when clipping excludes it from the rendered area. Correct the relevant source bounds or clipping first.

Does viewBox always crop exactly like an image rectangle?

No. Coordinate mapping and clipping behaviour must be considered with the SVG’s viewport and rendering context.

Can the compressor edit an SVG clipping path?

No. Use an appropriate vector editor for authorised source corrections.

Sources and further reading

Summary

Find where the edge disappears, correct that stage, and render again. More pixels improve sampling only after the intended artwork is actually included.

Related guides

Browse all guides →