Understanding the factors that influence cycling safety in urban environments is critical to promote sustainable and safe mobility. Cyclists require both objective safety (protection from crashes) and subjective safety (feeling safe while cycling). Although previous research has examined how urban elements influence each type of safety, studies typically analyze a limited number of elements and focus on only one safety type at a time. This study addresses this gap by integrating street-level imagery and spatial information to characterize how the urban cycling context influences both objective and subjective cycling safety. We analyze the impacts of urban elements on each safety type separately using a machine learning approach that allows for a large number of elements to be analysed simultaneously and captures non-linear effects. We then conduct a comparative analysis to identify the effects of urban elements on objective and subjective safety, distinguishing between similar and opposing effects. Results show that while some elements have similar effects on both safety types, others affect only one safety type, and others have opposing effects. These findings highlight the importance of aligning urban planning and safety measures with both actual and perceived safety needs of cyclists. Failing to account for both effects simultaneously when designing safety improvement interventions may lead to unwanted effects on one type of safety when trying to a improve the other. Overall, such a dual-perspective approach provides a more comprehensive understanding of cycling safety, with implications for urban design, policy interventions, and the development of safer cycling networks.