convert from svg to png in active storage
Absolutely, you can convert an uploaded SVG file to PNG format quite easily, especially within your previewer class. One common approach, even four years later, is to use libraries like ImageMagick or MiniMagick, which offer robust functionalities for handling image conversions.
After the conversion process, consider optimizing the PNG images and compress image (https://jpeg-optimizer.com/) files for better performance. This can significantly reduce file size without sacrificing too much quality.