Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Pardon my ignorance, but when you specify the height and width of an image, wouldn't this hamper the ability to utilize media queries/responsive design? I understand what AMP is trying to solve, but it seems to be backwards in terms of how CSS can be utilized for responsive design.


You can set an amp image to be responsive which resizes it to the declared dimension's aspect ratio!


It theoretically does, yes. The width/height could probably be specified through media queries, but I don't know how well that would perform in modern layout engines - I expect they've implemented this in Chrome for AMP but I haven't tested it.


I am just trying to wrap my head around the use case for AMP.

On one hand, you have a faster loading site/page which is good for users and helps with SEO ranking, but as a developer, you lose some flexibility in terms of specifying your layout for multiple cases.

I guess if the majority of your traffic is mobile-based in areas with typically slower internet connections, then it makes more sense to utilize something like AMP. But if that is not the case, it seems like you have to do twice the work for not much gain...


The use case is that it will improve your search rankings, and giving you an argument to force your organisation and your ad-partners to make your site faster. It's effectively Google making up a tool they can force-feed big publishers to get them to make websites that perform less horribly, which makes the top results of Google search on mobile more useful and leaves more traffic to look at more pages and more Google ads.

There is no reason why a normal website can't be as fast or faster than an AMP one, but AMP gives the framework to get organisations that otherwise wouldn't care enough to do so.


This is the exact strategy Microsoft used for lock in way back when. You could use ASP and other MS technologies and they even worked well. Until you wanted to exit their walled garden - then they were a real pain to integrate with anything usual.


Isn't AMP available as an open-source library? I don't see the lock-in.

Besides, Google has announced that search rankings will be affected by speed, not by what library you use. So, if your site is already optimal (doesn't benefit from AMP) or you want to use some competing project that also does a great job, you won't be penalised.

I don't see the walled garden argument here.


They don't mean you have to specify a fixed size in pixels. You can specify it in terms of page-width percentage for example. The specification must just be enough to allocate a bounding box in the page layout before downloading the image.


If that is the case, that seems sane.

I had jumped to some conclusions; if I am not mistaken, CSS needs to be written inline for AMP and so I assumed that the spec (based on the author's post) would require that the image be specified in exact pixels.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: