Scaling porosity of sedimentary rocks from the scale of measurement to the scale of interest is still a challenge. Upscaling of porosity can assist to accurately predict other petrophysical properties of rock at multiple scales. In this study, we use the two-dimensional (2D) scanning electron microscope (SEM) and three-dimensional (3D) X-ray micro-computed tomography (micro-CT) image to upscale porosity from the image scale to the core plug scale. A systematic imaging plan is deployed to capture rock properties of a carbonate and a sandstone sample, which are sensitive to the fractal nature of these rocks. Image analysis records wider pore spectrum (0.12–50 µm) in the carbonate sample than in sandstone (0.12–30 µm). The fractal dimensions are also higher in the carbonate than in the sandstone sample. Median, volume-weighted average of pore radius, and fractal dimensions derived from the image analysis are used as inputs in this equation. The results of the present study using this equation yielded to the best results on a resolution of 2.5 µm/voxel in the sandstone and 2.01 µm/voxel resolution in the carbonate sample for 3D micro-CT images, where fractal-scaling porosity matches well with the porosity measured at the core plug scale. The 2D SEM images provided a good estimation of porosity in the sandstone sample, where micro-CT imaging techniques could not capture the full pore spectrum. The fractal porosity equation showed promising results and offers a potential alternative way to estimate porosity when there are no routine core measurements available.