In digital image processing, filtering tasks are typically implemented using filtering masks of very small sizes, for instance, 3x3, 5x5, or 7x7. The choice of filtering coefficients are usually heuristic, without rigorous mathematical derivation. In this work, we propose a constrained least-squared (LS) error approach to design 5x5 image filtering masks, which have moderate degrees of freedom. The emphasis is on effective design of filtering masks of very small sizes. In specific, we concentrate on design of 2-D fan filters with quadrantal symmetry. Design formulas are explicitly derived.Some examples are provided to demonstrate the effectiveness of this principled design technique.