# Adjust the JPEG image quality Following this guide you will learn how to adjust JPG images quality when rendering documents with Image Viewer by GroupDocs. Decreasing the JPG images quality reduces the size of the output file. To adjust images quality, set the [Quality](https://reference.groupdocs.com/net/viewer/groupdocs.viewer.options/jpgviewoptions/properties/quality) property of the [JpgViewOptions](https://reference.groupdocs.com/net/viewer/groupdocs.viewer.options/jpgviewoptions) class. The value must be between 1 (minimum quality) and 100. The default value is 90. To set the image quality, follow these steps: 1. Instantiate the [Viewer](https://reference.groupdocs.com/net/viewer/groupdocs.viewer/viewer) class. Specify the source document path as a constructor parameter. 1. Instantiate the [JpgViewOptions](https://reference.groupdocs.com/net/viewer/groupdocs.viewer.options/jpgviewoptions) object. 2. Set the [Quality](https://reference.groupdocs.com/net/viewer/groupdocs.viewer.options/jpgviewoptions/properties/quality) value. 3. Call the [View](https://reference.groupdocs.com/net/viewer/groupdocs.viewer/viewer/methods/view) method of the [Viewer](https://reference.groupdocs.com/net/viewer/groupdocs.viewer/viewer) object. Specify the [JpgViewOptions](https://reference.groupdocs.com/net/viewer/groupdocs.viewer.options/jpgviewoptions) object as the parameter. The following code snippet shows how to adjust quality of the output JPG image: {{< tabs "adjust-jpg-quality">}} {{< tab "C#" >}} ```csharp using GroupDocs.Viewer; using GroupDocs.Viewer.Options; // ... using (Viewer viewer = new Viewer("sample.docx")) { // Create a JPG file. JpgViewOptions viewOptions = new JpgViewOptions(); // Specify the JPG image quality. viewOptions.Quality = 50; viewer.View(viewOptions); } ``` {{< /tab >}} {{< tab "VB.NET">}} ```vb Imports GroupDocs.Viewer Imports GroupDocs.Viewer.Options ' ... Module Program Sub Main(args As String()) Using viewer As Viewer = New Viewer("sample.docx") ' Create a JPG file. Dim viewOptions As JpgViewOptions = New JpgViewOptions() ' Specify the JPG image quality. viewOptions.Quality = 50 viewer.View(viewOptions) End Using End Sub End Module ``` {{< /tab >}} {{< tab "sample.docx" >}} {{< tab-text >}} `sample.docx` is the sample file used in this example. Click [here](https://docs.groupdocs.com/viewer/net/_sample_files/developer-guide/rendering-documents/rendering-to-png-or-jpeg/image-viewer-adjust-quality-for-jpg/sample.docx) to download it. {{< /tab-text >}} {{< /tab >}} {{< tab "adjust-jpg-quality.zip" >}} ```text p_1.jpg (41 KB) p_2.jpg (56 KB) p_3.jpg (49 KB) p_4.jpg (54 KB) p_5.jpg (36 KB) ``` [Download full output](https://docs.groupdocs.com/viewer/net/_output_files/developer-guide/rendering-documents/rendering-to-png-or-jpeg/image-viewer-adjust-quality-for-jpg/AdjustJpgQuality/adjust-jpg-quality.zip) {{< /tab >}} {{< /tabs >}}