add justified gallery files
fix doctype and image offset detection behavior