Actually I don't think there is much evidence that Einstein was attacked or thought ridiculous. I suspect this is largely a romantic myth, perpetuated by people who want their own alternative ideas to be given credit - a variant on the "They laughed at Galileo" gambit.
In fact, Einstein's annus mirabilis papers were published in 1905, when he was 26, and already by 1908 he was recognised as a leading physicist and appointed lecturer at Bern, being promoted to associate professor a year later and becoming a full professor* at Prague in 1911. That is a pretty rapid acceptance by the science community, by any standards.
*In Europe a professor is not just any old academic teacher but the head of a faculty or a prestigious guest academic.